xie.kaifeng il y a 6 mois
Parent
commit
9645298410
52 fichiers modifiés avec 2046 ajouts et 36 suppressions
  1. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java
  2. 14 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/MarketRunManagerController.java
  3. 36 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemRunController.java
  4. 119 6
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemSetUpController.java
  5. 1 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ICommonService.java
  6. 4 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IMarketRunManageService.java
  7. 10 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemRunService.java
  8. 32 3
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemSetUpService.java
  9. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java
  10. 241 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/MarketRunManageServiceImpl.java
  11. 100 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemRunServiceImpl.java
  12. 432 12
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemSetUpServiceImpl.java
  13. 2 0
      mtp3-century/src/main/java/com/muchinfo/mtp3century/vo/TreeNode.java
  14. 3 0
      mtp3-century/src/main/resources/mapper/DivisionMapper.xml
  15. 22 0
      mtp3-century/src/main/resources/mapper/ISystemRunService.xml
  16. 12 0
      mtp3-century/src/main/resources/mapper/MarketMapper.xml
  17. 8 0
      mtp3-century/src/main/resources/mapper/SystemmanagerMapper.xml
  18. 104 0
      mtp3-century/src/main/resources/mapper/TradeOrderdetailMapper.xml
  19. 5 0
      mtp3-century/src/main/resources/message_en.properties
  20. 5 0
      mtp3-century/src/main/resources/message_th.properties
  21. 5 0
      mtp3-century/src/main/resources/message_vi.properties
  22. 5 0
      mtp3-century/src/main/resources/message_zh-cn.properties
  23. 5 0
      mtp3-century/src/main/resources/message_zh-hk.properties
  24. 5 0
      mtp3-century/src/main/resources/message_zh-tw.properties
  25. 5 0
      mtp3-common/src/main/java/com/muchinfo/mtp3common/enumtype/MessageType.java
  26. 50 0
      mtp3-common/src/main/java/com/muchinfo/mtp3common/utils/CommonUtil.java
  27. 4 2
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IDivisionMapper.java
  28. 16 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IExchangerateconfigMapper.java
  29. 2 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketMapper.java
  30. 16 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketsectionMapper.java
  31. 16 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketsectionconfignewMapper.java
  32. 3 4
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ISystemmanagerMapper.java
  33. 16 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ISzdz2ImageconfigMapper.java
  34. 3 1
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ITaaccountMapper.java
  35. 7 0
      mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ITradeOrderdetailMapper.java
  36. 64 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Exchangerateconfig.java
  37. 103 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Marketsection.java
  38. 80 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Marketsectionconfignew.java
  39. 95 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Szdz2Imageconfig.java
  40. 46 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/MarketRunPositionCountParam.java
  41. 60 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/MarketRunPositionResult.java
  42. 37 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/TradeCloseDetailParam.java
  43. 25 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemrun/SystemRateResult.java
  44. 1 1
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemrun/YmrslQueryResult.java
  45. 23 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/DivisionAddParam.java
  46. 19 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/OaConfigAddParam.java
  47. 19 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/OaConfigParam.java
  48. 39 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionAddMarket.java
  49. 45 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionAddParam.java
  50. 4 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionParam.java
  51. 41 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemPictureDealParam.java
  52. 33 0
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemPictureSetParam.java

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java

@@ -212,9 +212,9 @@ public class CommonController {
     @ApiOperation("资金账户下拉框 平台查所有,经纪会员/子机构查自己及下级,其它角色查自己")
     @RequestMapping(method = RequestMethod.GET, value = "/queryTAAccountChildren")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(HttpServletRequest request, String searchCode) {
+    private AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(HttpServletRequest request, String searchCode,Integer usertype) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        return iCommonService.queryTAAccountChildren(searchCode, systemmanager.getAreauserid(), request);
+        return iCommonService.queryTAAccountChildren(searchCode, systemmanager.getAreauserid() ,usertype, request);
     }
 
     @ApiOperation("商品查询下拉框")

+ 14 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/MarketRunManagerController.java

@@ -79,4 +79,18 @@ public class MarketRunManagerController {
     private AjaxResult<PositionSheetResult> queryHolderDetailMonitor(Long accountid, Long goodsid, HttpServletRequest request) {
         return iMarketRunManageService.queryHolderDetailMonitor(accountid, goodsid, request);
     }
+
+    @ApiOperation("市场运行管理-->监控管理-->持仓汇总监控-->获取列表")
+    @RequestMapping(method = RequestMethod.GET, value = "/positionCount")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private PageResult<AccPosInfoVo> positionCount(MarketRunPositionCountParam param, HttpServletRequest request) {
+        return iMarketRunManageService.positionCount(param, request);
+    }
+
+    @ApiOperation("市场运行管理-->监控管理-->持仓汇总监控-->买、卖持仓监控")
+    @RequestMapping(method = RequestMethod.GET, value = "/positionForBuyOrSell")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private PageResult<MarketRunPositionResult> positionForBuyOrSell(MarketRunPositionCountParam param, HttpServletRequest request) {
+        return iMarketRunManageService.positionForBuyOrSell(param, request);
+    }
 }

+ 36 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemRunController.java

@@ -4,6 +4,7 @@ package com.muchinfo.mtp3century.controller;
 import com.muchinfo.mtp3century.service.ISystemRunService;
 import com.muchinfo.mtp3century.utils.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
+import com.muchinfo.mtp3pojos.entity.Exchangerateconfig;
 import com.muchinfo.mtp3pojos.entity.Ipbacklist;
 import com.muchinfo.mtp3pojos.entity.Systemmanagerlog;
 import com.muchinfo.mtp3pojos.entity.WskhBlacklist;
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
 
 @Controller
 @RequestMapping("/operation")
@@ -78,7 +80,7 @@ public class SystemRunController {
 
     @ApiOperation("系统运行管理-->开户黑名单管理-->新增/修改")
     @ResponseBody
-    @RequestMapping(method = RequestMethod.GET, value = "/dealBlackList")
+    @RequestMapping(method = RequestMethod.POST, value = "/dealBlackList")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult dealBlackList(@RequestBody BlackListAddParam param, HttpServletRequest request) {
         return iSystemSetUpService.dealBlackList(param, request);
@@ -102,7 +104,7 @@ public class SystemRunController {
 
     @ApiOperation("系统运行管理-->IP黑名单管理-->新增")
     @ResponseBody
-    @RequestMapping(method = RequestMethod.GET, value = "/addIPList")
+    @RequestMapping(method = RequestMethod.POST, value = "/addIPList")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult addIPList(@RequestBody IpListDelParam param, HttpServletRequest request) {
         return iSystemSetUpService.addIPList(param, request);
@@ -139,4 +141,36 @@ public class SystemRunController {
     public AjaxResult loginlogExport(LoginLogQueryParam param, HttpServletRequest request) {
         return iSystemSetUpService.loginlogExport(param, request);
     }
+
+    @ApiOperation("系统运行管理-->系统汇率管理-->获取列表")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/queryrate")
+    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
+    private PageResult<Exchangerateconfig> queryrate(Integer pageNum, Integer pageSize, HttpServletRequest request) {
+        return iSystemSetUpService.queryrate(pageNum, pageSize, request);
+    }
+
+    @ApiOperation("系统运行管理-->系统汇率管理-->删除")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/deleteRate")
+    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
+    private AjaxResult deleteRate(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request) {
+        return iSystemSetUpService.deleteRate(oricurrencyid, descurrencyid, request);
+    }
+
+    @ApiOperation("系统运行管理-->系统汇率管理-->新增/修改初始化")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/dealinit")
+    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
+    private AjaxResult<SystemRateResult> dealinit(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request) {
+        return iSystemSetUpService.dealinit(oricurrencyid, descurrencyid, request);
+    }
+
+    @ApiOperation("系统运行管理-->系统汇率管理-->新增/修改 flag==0 新增 flag==1 修改")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/dealRate")
+    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
+    private AjaxResult dealRate(Integer oricurrencyid, Integer descurrencyid, BigDecimal exchangerate, Integer flag, HttpServletRequest request) {
+        return iSystemSetUpService.dealRate(oricurrencyid, descurrencyid, exchangerate, flag, request);
+    }
 }

+ 119 - 6
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemSetUpController.java

@@ -2,9 +2,9 @@ package com.muchinfo.mtp3century.controller;
 
 import com.muchinfo.mtp3century.service.ISystemSetUpService;
 import com.muchinfo.mtp3century.utils.AjaxResult;
+import com.muchinfo.mtp3century.vo.TreeNode;
 import com.muchinfo.mtp3common.vo.PageResult;
-import com.muchinfo.mtp3pojos.entity.Errorcode;
-import com.muchinfo.mtp3pojos.entity.Systemparam;
+import com.muchinfo.mtp3pojos.entity.*;
 import com.muchinfo.mtp3pojos.vo.systemsetup.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
 
 @Controller
 @RequestMapping("/setup")
@@ -36,7 +37,7 @@ public class SystemSetUpController {
 
     @ApiOperation("基础数据管理-->系统参数管理-->修改")
     @ResponseBody
-    @RequestMapping(method = RequestMethod.GET, value = "/dealParam")
+    @RequestMapping(method = RequestMethod.POST, value = "/dealParam")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult query(@RequestBody SystemParamUpdate paramUpdate, HttpServletRequest request) {
         return iSystemSetUpService.dealParam(paramUpdate, request);
@@ -52,7 +53,7 @@ public class SystemSetUpController {
 
     @ApiOperation("基础数据管理-->错误码管理-->修改")
     @ResponseBody
-    @RequestMapping(method = RequestMethod.GET, value = "/dealErr")
+    @RequestMapping(method = RequestMethod.POST, value = "/dealErr")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult dealErr(@RequestBody SystemErrorCodeParam param, HttpServletRequest request) {
         return iSystemSetUpService.dealErr(param, request);
@@ -62,8 +63,8 @@ public class SystemSetUpController {
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryMarketSet")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    private PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, Integer pageNum, Integer pageSize, HttpServletRequest request) {
-        return iSystemSetUpService.queryMarketSet(param, pageNum, pageSize, request);
+    private PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, HttpServletRequest request) {
+        return iSystemSetUpService.queryMarketSet(param, request);
     }
 
     @ApiOperation("基础数据管理-->市场板块设置-->详情")
@@ -74,4 +75,116 @@ public class SystemSetUpController {
         return iSystemSetUpService.marketSetDetail(marketsectionid, request);
     }
 
+    @ApiOperation("基础数据管理-->市场板块设置-->删除")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/deletemarketSet")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult deletemarketSet(Integer marketsectionid, HttpServletRequest request) {
+        return iSystemSetUpService.deletemarketSet(marketsectionid, request);
+    }
+
+    @ApiOperation("基础数据管理-->市场板块设置-->新增初始化市场")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/querytrademodes")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<Market> querytrademodes(HttpServletRequest request) {
+        return iSystemSetUpService.querytrademodes(request);
+    }
+
+
+    @ApiOperation("基础数据管理-->市场板块设置-->新增,修改")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST, value = "/delmarket")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult delmarket(@RequestBody SystemMarketSectionAddParam param, HttpServletRequest request) {
+        return iSystemSetUpService.delmarket(param, request);
+    }
+
+    @ApiOperation("基础数据管理-->终端图片管理-->获取列表")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/querypicture")
+    @ApiResponse(code = 200, message = "成功", response = PageResult.class)
+    private PageResult<Szdz2Imageconfig> querypicture(SystemPictureSetParam param, HttpServletRequest request) {
+        return iSystemSetUpService.querypicture(param, request);
+    }
+
+    @ApiOperation("基础数据管理-->终端图片管理-->详情")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/pictureDetail")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<Szdz2Imageconfig> pictureDetail(Integer configid, HttpServletRequest request) {
+        return iSystemSetUpService.pictureDetail(configid, request);
+    }
+
+    @ApiOperation("基础数据管理-->终端图片管理-->删除")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/deletepicture")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult deletepicture(Integer configid, HttpServletRequest request) {
+        return iSystemSetUpService.deletepicture(configid, request);
+    }
+
+    @ApiOperation("基础数据管理-->终端图片管理-->新增,修改")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST, value = "/dealpicture")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult dealpicture(@RequestBody SystemPictureDealParam param, HttpServletRequest request) {
+        return iSystemSetUpService.dealpicture(param, request);
+    }
+
+    @ApiOperation("基础数据管理-->网上开户配置-->详情")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/oaconfig")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<Map<Long, Object>> oaconfig(HttpServletRequest request) {
+        return iSystemSetUpService.oaconfig(request);
+    }
+
+    @ApiOperation("基础数据管理-->网上开户配置-->保存")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/oaconfigAdd")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult oaconfigAdd(@RequestBody OaConfigParam param, HttpServletRequest request) {
+        return iSystemSetUpService.oaconfigAdd(param, request);
+    }
+
+    @ApiOperation("基础数据管理-->行政区域管理-->获取菜单树")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/divisiontree")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<TreeNode> divisiontree(HttpServletRequest request) {
+        return iSystemSetUpService.divisiontree(request);
+    }
+
+    @ApiOperation("基础数据管理-->行政区域管理-->获取详情")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/queryAreaByCondition")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<Division> queryAreaByCondition(HttpServletRequest request, String parentcode) {
+        return iSystemSetUpService.queryAreaByCondition(request, parentcode);
+    }
+
+    @ApiOperation("基础数据管理-->行政区域管理-->获取地区信息")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/getParentByAreacode")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult<Division> getParentByAreacode(HttpServletRequest request, String parentcode) {
+        return iSystemSetUpService.getParentByAreacode(request, parentcode);
+    }
+
+    @ApiOperation("基础数据管理-->行政区域管理-->新增、修改")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST, value = "/dealDiv")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult dealDiv(HttpServletRequest request, @RequestBody DivisionAddParam param) {
+        return iSystemSetUpService.dealDiv(request, param);
+    }
+
+    @ApiOperation("基础数据管理-->行政区域管理-->删除")
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET, value = "/deleteDiv")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    private AjaxResult deleteDiv(HttpServletRequest request, Long areaid) {
+        return iSystemSetUpService.deleteDiv(request, areaid);
+    }
 }

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ICommonService.java

@@ -31,7 +31,7 @@ public interface ICommonService {
 
     AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName, HttpServletRequest request);
 
-    AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId, HttpServletRequest request);
+    AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId,Integer usertype, HttpServletRequest request);
 
     AjaxResult<GoodsSelectResult> queryGoodsSelect(GoodsSelectParam param, HttpServletRequest request);
 

+ 4 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IMarketRunManageService.java

@@ -23,4 +23,8 @@ public interface IMarketRunManageService {
     AjaxResult<AccPosInfoVo> accpage(Long accountid, HttpServletRequest request);
 
     AjaxResult<PositionSheetResult> queryHolderDetailMonitor(Long accountid, Long goodsid, HttpServletRequest request);
+
+    PageResult<AccPosInfoVo> positionCount(MarketRunPositionCountParam param, HttpServletRequest request);
+
+    PageResult<MarketRunPositionResult> positionForBuyOrSell(MarketRunPositionCountParam param, HttpServletRequest request);
 }

+ 10 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemRunService.java

@@ -2,12 +2,14 @@ package com.muchinfo.mtp3century.service;
 
 import com.muchinfo.mtp3century.utils.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
+import com.muchinfo.mtp3pojos.entity.Exchangerateconfig;
 import com.muchinfo.mtp3pojos.entity.Ipbacklist;
 import com.muchinfo.mtp3pojos.entity.Systemmanagerlog;
 import com.muchinfo.mtp3pojos.entity.WskhBlacklist;
 import com.muchinfo.mtp3pojos.vo.systemrun.*;
 
 import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
 
 public interface ISystemRunService {
     PageResult<SystemUserLogResult> queryByPage(SystemUserLogParam param, HttpServletRequest request);
@@ -37,4 +39,12 @@ public interface ISystemRunService {
     AjaxResult<LoginLogQueryResult> loginlogview(LoginLogQueryParam param, HttpServletRequest request);
 
     AjaxResult loginlogExport(LoginLogQueryParam param, HttpServletRequest request);
+
+    PageResult<Exchangerateconfig> queryrate(Integer pageNum, Integer pageSize, HttpServletRequest request);
+
+    AjaxResult deleteRate(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request);
+
+    AjaxResult<SystemRateResult> dealinit(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request);
+
+    AjaxResult dealRate(Integer oricurrencyid, Integer descurrencyid, BigDecimal exchangerate, Integer flag, HttpServletRequest request);
 }

+ 32 - 3
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemSetUpService.java

@@ -1,12 +1,13 @@
 package com.muchinfo.mtp3century.service;
 
 import com.muchinfo.mtp3century.utils.AjaxResult;
+import com.muchinfo.mtp3century.vo.TreeNode;
 import com.muchinfo.mtp3common.vo.PageResult;
-import com.muchinfo.mtp3pojos.entity.Errorcode;
-import com.muchinfo.mtp3pojos.entity.Systemparam;
+import com.muchinfo.mtp3pojos.entity.*;
 import com.muchinfo.mtp3pojos.vo.systemsetup.*;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
 
 public interface ISystemSetUpService {
     PageResult<Systemparam> queryByPage(Integer pageNum, Integer pageSize, HttpServletRequest request);
@@ -17,7 +18,35 @@ public interface ISystemSetUpService {
 
     AjaxResult dealErr(SystemErrorCodeParam param, HttpServletRequest request);
 
-    PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, Integer pageNum, Integer pageSize, HttpServletRequest request);
+    PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, HttpServletRequest request);
 
     AjaxResult<SystemMarketSetDetail> marketSetDetail(Integer marketsectionid,  HttpServletRequest request);
+
+    AjaxResult deletemarketSet(Integer marketsectionid, HttpServletRequest request);
+
+    AjaxResult<Market> querytrademodes(HttpServletRequest request);
+
+    AjaxResult delmarket(SystemMarketSectionAddParam param, HttpServletRequest request);
+
+    PageResult<Szdz2Imageconfig> querypicture(SystemPictureSetParam param, HttpServletRequest request);
+
+    AjaxResult<Szdz2Imageconfig> pictureDetail(Integer configid, HttpServletRequest request);
+
+    AjaxResult dealpicture(SystemPictureDealParam param, HttpServletRequest request);
+
+    AjaxResult deletepicture(Integer configid, HttpServletRequest request);
+
+    AjaxResult<Map<Long, Object>> oaconfig(HttpServletRequest request);
+
+    AjaxResult oaconfigAdd(OaConfigParam param, HttpServletRequest request);
+
+    AjaxResult<TreeNode> divisiontree(HttpServletRequest request);
+
+    AjaxResult<Division> queryAreaByCondition(HttpServletRequest request, String parentcode);
+
+    AjaxResult<Division> getParentByAreacode(HttpServletRequest request, String parentcode);
+
+    AjaxResult dealDiv(HttpServletRequest request, DivisionAddParam param);
+
+    AjaxResult deleteDiv(HttpServletRequest request, Long areaid);
 }

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java

@@ -211,8 +211,8 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId, HttpServletRequest request) {
-        List<TAAccountChildrenResult> results = iTaaccountMapper.queryTAAccountChildren(accountName, areaUserId);
+    public AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId, Integer usertype, HttpServletRequest request) {
+        List<TAAccountChildrenResult> results = iTaaccountMapper.queryTAAccountChildren(accountName, areaUserId, usertype);
         return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 

+ 241 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/MarketRunManageServiceImpl.java

@@ -37,6 +37,9 @@ import org.springframework.amqp.core.Message;
 import org.springframework.amqp.core.MessageProperties;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import com.muchinfo.mtp.proto.AccountRedis.AccRiskInfo;
+import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -70,6 +73,10 @@ public class MarketRunManageServiceImpl implements IMarketRunManageService {
     private IMarketMapper iMarketMapper;
     @Resource
     private QueryServiceImpl queryService;
+    @Resource
+    private ITaaccountMapper iTaaccountMapper;
+    @Resource
+    private RedisTemplate<String, String> redisTemplate;
 
     @Override
     public PageResult<MarketRunLoginUserResult> queryUserLogin(String loginid, Integer pageNum, Integer pageSize, HttpServletRequest request) {
@@ -251,6 +258,240 @@ public class MarketRunManageServiceImpl implements IMarketRunManageService {
         return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 
+    @Override
+    public PageResult<AccPosInfoVo> positionCount(MarketRunPositionCountParam param, HttpServletRequest request) {
+        PageResult<AccPosInfoVo> page = new PageResult<>();
+        RedisConnection redisConn = null;
+        try {
+            redisConn = redisTemplate.getConnectionFactory().getConnection();
+            List<AccPosInfoVo> resultList = new ArrayList<>();
+
+            String key = null;
+            redisTemplate.setValueSerializer(new StringRedisSerializer());
+            Set<String> set = null;
+
+            key = "sort_by_rate_investor";
+            set = redisTemplate.opsForZSet().rangeByScore(key, -10000, 10000000.0);
+
+            if (set != null && !set.isEmpty()) {
+                // 获取商品的持仓账户
+                List<TaaccountMonitorVo> taVos = iTaaccountMapper.getMonitorInvestorsByAccPos(param);
+
+                for (Object p : set) {
+                    Long accountid = Long.valueOf(p.toString());
+                    TaaccountMonitorVo taVo = null;
+                    Boolean searchFlag = true;
+                    if (param.getAccountid() != null && !accountid.equals(param.getAccountid())) {
+                        // 根据交易商条件过滤
+                        searchFlag = false;
+                    }
+
+                    if (org.apache.commons.lang3.StringUtils.isNotBlank(param.getExcludeaccountids())) {
+                        // 根据排除交易商过滤, 替换中文逗号, 前后加逗号比较
+                        String excludeIds = "," + param.getExcludeaccountids().replace(",", ",") + ",";
+                        if (excludeIds.contains("," + accountid.toString() + ",")) {
+                            searchFlag = false;
+                        }
+                    }
+
+                    if (org.apache.commons.lang3.StringUtils.isNotBlank(param.getIncludeaccountids())) {
+                        // 根据包含交易商过滤, 替换中文逗号, 前后加逗号比较
+                        String includeIds = "," + param.getIncludeaccountids().replace(",", ",") + ",";
+                        if (!includeIds.contains("," + accountid.toString() + ",")) {
+                            searchFlag = false;
+                        }
+                    }
+
+                    if (searchFlag) {
+                        taVo = getTaaccountMonitorVo(taVos, accountid);
+                        if (taVo == null){
+                            continue;
+                        }
+
+                        byte[] keybts = redisTemplate.getStringSerializer().serialize("risk:" + accountid);
+                        byte[] valuebts = redisConn.get(keybts);
+                        if (valuebts == null) {
+                            continue;
+                        }
+                        AccPosInfoVo accPosInfoVo = new AccPosInfoVo();
+                        accPosInfoVo.setGoodsid(param.getGoodsid());
+                        AccRiskInfo accRiskInfo = AccRiskInfo.newBuilder().mergeFrom(valuebts).build();
+                        resultList.addAll(generateAccPosInfo(accRiskInfo, accPosInfoVo, taVo, accountid));
+                    }
+                }
+            }
+            // 添加汇总行 只汇总当前页
+            AccPosInfoVo sumVo = new AccPosInfoVo();
+            sumVo.setGoodsid(null);
+            sumVo.setUsername("汇总");
+            sumVo.setBuy_hold_qty(0);
+            sumVo.setBuy_float_pl(0.0);
+            sumVo.setSell_hold_qty(0);
+            sumVo.setSell_float_pl(0.0);
+            sumVo.setTotal_float_pl(0.0);
+
+            Object c = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "1001");
+            if (c != null && c.toString().equals("1")) {
+                // 添加查询条件账户的总平仓盈亏
+                TradeCloseDetailParam vo = new TradeCloseDetailParam();
+                if (param.getAccountid() != null) {
+                    vo.setAccountid(param.getAccountid());
+                }
+                if (StringUtils.isNotBlank(param.getExcludeaccountids())) {
+                    vo.setExcludeaccountids(param.getExcludeaccountids().split(","));
+                }
+                if (param.getGoodsid() != null) {
+                    vo.setGoodsid(param.getGoodsid());
+                }
+                TradeCloseDetailParam voObj = iTradeOrderdetailMapper.querySumClosePL(vo);
+                if (voObj != null && voObj.getClosepl() != null) {
+                    sumVo.setParentname("总平仓损益:" + voObj.getClosepl());
+                }
+            }
+            // 返回结果排序
+            if (param.getOrderby() != null) {
+                // 默认1:总损益倒序
+                String sortField = "total_float_pl";
+                Boolean isAsc = false;
+                // 1:总损益倒序, 2:总损益顺序, 3:买量倒序, 4:买量顺序,5:卖量倒序,6:卖量顺序
+                switch (param.getOrderby()) {
+                    case 2:// 2 总损益顺序
+                        sortField = "total_float_pl";
+                        isAsc = true;
+                        break;
+                    case 3: //3:买量倒序
+                        sortField = "buy_hold_qty";
+                        break;
+                    case 4: //4:买量顺序
+                        sortField = "buy_hold_qty";
+                        isAsc = true;
+                        break;
+                    case 5: //5:卖量倒序
+                        sortField = "sell_hold_qty";
+                        break;
+                    case 6: //6:卖量顺序
+                        sortField = "sell_hold_qty";
+                        isAsc = true;
+                        break;
+                    default:// 默认1:总损益倒序
+                        break;
+                }
+                CommonUtil.sortByField(resultList, sortField, isAsc);
+            }
+
+            // 本页数据汇总 -> 改为总数据汇总 20230927 -- dyp
+            List<AccPosInfoVo> pageList = new ArrayList<>();
+            if (!resultList.isEmpty()) {
+                int index = 0;
+                int startIndex = Math.toIntExact((param.getPageNum() - 1) * param.getPageSize());
+                int endIndex = Math.toIntExact(param.getPageNum() * param.getPageSize());
+                for (AccPosInfoVo p : resultList) {
+                    if (index >= startIndex && index < endIndex) {
+                        pageList.add(p);
+                    }
+                    index++;
+
+                    sumVo.setBuy_hold_qty(sumVo.getBuy_hold_qty() + p.getBuy_hold_qty());
+                    if (p.getBuy_float_pl() != null) {
+                        sumVo.setBuy_float_pl(sumVo.getBuy_float_pl() + p.getBuy_float_pl());
+                        sumVo.setTotal_float_pl(sumVo.getTotal_float_pl() + p.getBuy_float_pl());
+                    }
+                    sumVo.setSell_hold_qty(sumVo.getSell_hold_qty() + p.getSell_hold_qty());
+                    if (p.getSell_float_pl() != null) {
+                        sumVo.setSell_float_pl(sumVo.getSell_float_pl() + p.getSell_float_pl());
+                        sumVo.setTotal_float_pl(sumVo.getTotal_float_pl() + p.getSell_float_pl());
+                    }
+                }
+            }
+
+            //设置分页列表
+            page.setCurrent(param.getPageNum());
+            page.setPageSize(param.getPageSize());
+            page.setData(pageList);
+            page.setTotal((long) resultList.size());
+            page.getData().add(sumVo);
+            page.setCode(200);
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (redisConn != null) {
+                redisConn.close();
+            }
+        }
+        return page;
+    }
+
+    @Override
+    public PageResult<MarketRunPositionResult> positionForBuyOrSell(MarketRunPositionCountParam param, HttpServletRequest request) {
+        // 持仓汇总监控 》 买、卖监控查询
+        if (param != null && org.apache.commons.lang3.StringUtils.isNotBlank(param.getExcludeaccountids())) {
+            param.setExcludeaccountidarray(param.getExcludeaccountids().split(","));
+        }
+        if (param != null && org.apache.commons.lang3.StringUtils.isNotBlank(param.getIncludeaccountids())) {
+            param.setIncludeaccountidarray(param.getIncludeaccountids().split(","));
+        }
+        RedisConnection redisConn = null;
+        IPage<MarketRunPositionResult> page = new Page<>(param.getPageNum(), param.getPageSize());
+        IPage<MarketRunPositionResult> queryResultIPage = iTradeOrderdetailMapper.monitorHoldDetail(page, param);
+        List<MarketRunPositionResult> resultList = queryResultIPage.getRecords();
+        try {
+            redisConn = redisTemplate.getConnectionFactory().getConnection();
+            if (resultList != null) {
+                if (!resultList.isEmpty()) {
+
+                    for (MarketRunPositionResult tradeHolderDetailParam : resultList) {
+                        BigDecimal actuallYplS = null;//浮动盈亏
+                        actuallYplS = iCommonService.calcFloaPL(tradeHolderDetailParam.getGoodscode(),
+                                tradeHolderDetailParam.getAgreeUnit(), tradeHolderDetailParam.getBuyorsell(),
+                                tradeHolderDetailParam.getHolderqty(), tradeHolderDetailParam.getHolderamount());
+
+                        // 赋值浮动盈亏
+                        tradeHolderDetailParam.setActuallYplS(actuallYplS);
+                    }
+                }
+
+                if (param.getOrderby() != null) {
+                    if (param.getOrderby() == 1) {
+                        // 损益倒序
+                        CommonUtil.sortByField(resultList, "actuallYplS", false);
+                    } else if (param.getOrderby() == 2) {
+                        //损益顺序
+                        CommonUtil.sortByField(resultList, "actuallYplS", true);
+                    }
+                }
+
+                queryResultIPage.setRecords(resultList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (redisConn != null) {
+                redisConn.close();
+            }
+        }
+        PageResult<MarketRunPositionResult> result = new PageResult<>();
+        result.setCode(Constants.Success_Code_Design);
+        result.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
+        result.setPages(queryResultIPage.getPages());
+        result.setCurrent(queryResultIPage.getCurrent());
+        result.setTotal(queryResultIPage.getTotal());
+        result.setPageSize(queryResultIPage.getSize());
+        result.setData(queryResultIPage.getRecords());
+        return result;
+    }
+
+    private TaaccountMonitorVo getTaaccountMonitorVo(List<TaaccountMonitorVo> taVos, Long accountid){
+        if (taVos == null){
+            return null;
+        }
+        for(TaaccountMonitorVo vo: taVos){
+            if (vo != null && vo.getAccountid().equals(accountid)){
+                return vo;
+            }
+        }
+        return null;
+    }
+
     private List<AccPosInfoVo> generateAccPosInfo(AccRiskInfo accRiskInfo, AccPosInfoVo param, TaaccountMonitorVo taVo, Long accountid) {
         List<AccPosInfoVo> resultList = new ArrayList<>();
         List<AccountRedis.AccPosInfo> list = accRiskInfo.getPOSINFOList();

+ 100 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemRunServiceImpl.java

@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.base.Strings;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.ISystemRunService;
+import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
 import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
@@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
 import java.util.*;
 
 @Service
@@ -42,6 +45,10 @@ public class SystemRunServiceImpl implements ISystemRunService {
     private IWskhBlacklistMapper iWskhBlacklistMapper;
     @Resource
     private IIpbacklistMapper iIpbacklistMapper;
+    @Resource
+    private IExchangerateconfigMapper iExchangerateconfigMapper;
+    @Resource
+    private RedisServiceUtil redisServiceUtil;
 
     @Override
     public PageResult<SystemUserLogResult> queryByPage(SystemUserLogParam param, HttpServletRequest request) {
@@ -297,6 +304,99 @@ public class SystemRunServiceImpl implements ISystemRunService {
         }
     }
 
+    @Override
+    public PageResult<Exchangerateconfig> queryrate(Integer pageNum, Integer pageSize, HttpServletRequest request) {
+        IPage<Exchangerateconfig> page = new Page<>(pageNum, pageSize);
+        IPage<Exchangerateconfig> queryResultIPage = iExchangerateconfigMapper.selectPage(page, new QueryWrapper<>());
+        PageResult<Exchangerateconfig> result = new PageResult<>();
+        result.setCode(Constants.Success_Code_Design);
+        result.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
+        result.setPages(queryResultIPage.getPages());
+        result.setCurrent(queryResultIPage.getCurrent());
+        result.setTotal(queryResultIPage.getTotal());
+        result.setPageSize(queryResultIPage.getSize());
+        result.setData(queryResultIPage.getRecords());
+        return result;
+    }
+
+    @Override
+    public AjaxResult deleteRate(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request) {
+        iExchangerateconfigMapper.delete(new QueryWrapper<Exchangerateconfig>()
+                .eq("oricurrencyid", oricurrencyid)
+                .eq("descurrencyid", descurrencyid));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult<SystemRateResult> dealinit(Integer oricurrencyid, Integer descurrencyid, HttpServletRequest request) {
+        SystemRateResult result = new SystemRateResult();
+        // 配置商品币种到“系统参数942:资金账户基币”的汇率
+        Map<Object, Object> currencyMap = redisServiceUtil.getHash(Constants.REDIS_HEADER_DICT + "goodscurrency");
+        String mid = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, "942");
+        if (Strings.isNullOrEmpty(mid)) {
+            // 没有配置则默认为1:人民币
+            mid = "1";
+        }
+        // 从商品币种中移除基币
+        currencyMap.remove(mid);
+        if (oricurrencyid == null) {
+            iExchangerateconfigMapper.selectList(new QueryWrapper<>()).forEach(x -> {
+                if (currencyMap.containsKey((x).getOricurrencyid().toString())) {
+                    currencyMap.remove((x).getOricurrencyid().toString());
+                }
+            });
+            result.setCurrencyMap(currencyMap);
+            result.setDescurrencyid(mid);
+        } else {
+            List<Exchangerateconfig> exchangerateconfigs = iExchangerateconfigMapper.selectList(new QueryWrapper<Exchangerateconfig>()
+                    .eq("oricurrencyid", oricurrencyid)
+                    .eq("descurrencyid", descurrencyid));
+            result.setExchangerateconfig(exchangerateconfigs);
+            String oriid = exchangerateconfigs.get(0).getOricurrencyid().toString();
+            iExchangerateconfigMapper.selectList(new QueryWrapper<>()).forEach(x -> {
+                if (currencyMap.containsKey((x).getOricurrencyid().toString())
+                        && !oriid.equals((x).getOricurrencyid().toString())) {
+                    currencyMap.remove((x).getOricurrencyid().toString());
+                }
+            });
+            result.setCurrencyMap(currencyMap);
+        }
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
+    }
+
+    @Override
+    public AjaxResult dealRate(Integer oricurrencyid, Integer descurrencyid, BigDecimal exchangerate, Integer flag, HttpServletRequest request) {
+        Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        List<Exchangerateconfig> exchangerateconfigs = iExchangerateconfigMapper.selectList(new QueryWrapper<Exchangerateconfig>()
+                .eq("oricurrencyid", oricurrencyid)
+                .eq("descurrencyid", descurrencyid));
+        Exchangerateconfig entity = new Exchangerateconfig();
+        if(flag == 0){
+            if(CollectionUtils.isNotEmpty(exchangerateconfigs)){
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM021.getCode(), request.getHeader("Accept-Language"));
+            }
+            entity.setDescurrencyid(descurrencyid);
+            entity.setOricurrencyid(oricurrencyid);
+            entity.setExchangerate(exchangerate);
+            entity.setUpdateby(user.getAutoid());
+            entity.setUpdatetime(new Date());
+            iExchangerateconfigMapper.insert(entity);
+        }else{
+            if(CollectionUtils.isEmpty(exchangerateconfigs)){
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM022.getCode(), request.getHeader("Accept-Language"));
+            }
+            entity.setDescurrencyid(descurrencyid);
+            entity.setOricurrencyid(oricurrencyid);
+            entity.setExchangerate(exchangerate);
+            entity.setUpdateby(user.getAutoid());
+            entity.setUpdatetime(new Date());
+            iExchangerateconfigMapper.update(entity,new QueryWrapper<Exchangerateconfig>()
+                    .eq("oricurrencyid", oricurrencyid)
+                    .eq("descurrencyid", descurrencyid));
+        }
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
     private boolean checkOnlyOne(BlackListAddParam blacklist) {
         Long num = iWskhBlacklistMapper.selectCount(new QueryWrapper<WskhBlacklist>()
                 .eq("cardtype", blacklist.getCardtype())

+ 432 - 12
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemSetUpServiceImpl.java

@@ -2,20 +2,18 @@ package com.muchinfo.mtp3century.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.ISystemSetUpService;
 import com.muchinfo.mtp3century.utils.AjaxResult;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
+import com.muchinfo.mtp3century.vo.TreeNode;
 import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.vo.PageResult;
-import com.muchinfo.mtp3interface.mapper.IErrorcodeMapper;
-import com.muchinfo.mtp3interface.mapper.ISystemmanagerMapper;
-import com.muchinfo.mtp3interface.mapper.ISystemparamMapper;
-import com.muchinfo.mtp3pojos.entity.Errorcode;
-import com.muchinfo.mtp3pojos.entity.Systemmanager;
-import com.muchinfo.mtp3pojos.entity.Systemparam;
+import com.muchinfo.mtp3interface.mapper.*;
+import com.muchinfo.mtp3pojos.entity.*;
 import com.muchinfo.mtp3pojos.vo.I18nconfig;
 import com.muchinfo.mtp3pojos.vo.systemsetup.*;
 import org.slf4j.Logger;
@@ -25,9 +23,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 
 @Service
 public class SystemSetUpServiceImpl implements ISystemSetUpService {
@@ -42,6 +38,20 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
     private RedisServiceUtil redisServiceUtil;
     @Resource
     private IErrorcodeMapper iErrorcodeMapper;
+    @Resource
+    private IMarketMapper iMarketMapper;
+    @Resource
+    private IMarketsectionMapper iMarketsectionMapper;
+    @Resource
+    private SystemmanagerServiceImpl systemmanagerService;
+    @Resource
+    private IMarketsectionconfignewMapper iMarketsectionconfignewMapper;
+    @Resource
+    private ISzdz2ImageconfigMapper iSzdz2ImageconfigMapper;
+    @Resource
+    private IWskhOpenaccountconfigMapper iWskhOpenaccountconfigMapper;
+    @Resource
+    private IDivisionMapper iDivisionMapper;
 
     @Override
     public PageResult<Systemparam> queryByPage(Integer pageNum, Integer pageSize, HttpServletRequest request) {
@@ -116,8 +126,8 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
     }
 
     @Override
-    public PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, Integer pageNum, Integer pageSize, HttpServletRequest request) {
-        IPage<SystemMarketSectionResult> page = new Page<>(pageNum, pageSize);
+    public PageResult<SystemMarketSectionResult> queryMarketSet(SystemMarketSectionParam param, HttpServletRequest request) {
+        IPage<SystemMarketSectionResult> page = new Page<>(param.getPageNum(), param.getPageSize());
         IPage<SystemMarketSectionResult> resultIPage = iSystemmanagerMapper.queryMarketSet(page, param);
         PageResult<SystemMarketSectionResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
@@ -137,7 +147,417 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
         detail.setConfigs(configs);
         List<I18nconfig> i18nconfigs = iSystemmanagerMapper.queryI18nConfigs();
         detail.setI18nconfigs(i18nconfigs);
-        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"),detail);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), detail);
+    }
+
+    @Override
+    public AjaxResult deletemarketSet(Integer marketsectionid, HttpServletRequest request) {
+        iSystemmanagerMapper.deletemarketSet(marketsectionid);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult<Market> querytrademodes(HttpServletRequest request) {
+        List<Market> markets = iMarketMapper.queryTradeModeListNew();
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), markets);
+    }
+
+    @Override
+    public AjaxResult delmarket(SystemMarketSectionAddParam param, HttpServletRequest request) {
+        Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        if (param.getMarketsectionid() != null) {
+            // 修改
+            Marketsection marketSection = iMarketsectionMapper.selectOne(new QueryWrapper<Marketsection>().eq("marketsectionid", param.getMarketsectionid()));
+            if (marketSection != null) {
+                marketSection.setMarketsectionname(param.getMarketsectionname());
+                marketSection.setOrderindex(param.getOrderindex());
+                marketSection.setPictureurl(param.getPictureurl());
+                marketSection.setRemark(param.getRemark());
+                marketSection.setModifytime(new Date());
+                marketSection.setModifierid(systemmanager.getAutoid());
+                marketSection.setModifiersrc(1);
+                marketSection.setIsvalid(1);
+                marketSection.setMarketsectionnameen(param.getMarketsectionnameen());
+                marketSection.setMarketsectionnamezhTw(param.getMarketsectionnamezhtw());
+                marketSection.setMarketsectionnameth(param.getMarketsectionnameth());
+                marketSection.setMarketsectionnamevi(param.getMarketsectionnamevi());
+                iMarketsectionMapper.updateById(marketSection);
+
+                // 删除 “MarketSectionConfigNew” 相关记录
+                iMarketsectionconfignewMapper.delete(new QueryWrapper<Marketsectionconfignew>().eq("marketsectionid", marketSection.getMarketsectionid()));
+
+                // 添加“MarketSectionConfigNew”表相关记录
+                addConfigNew(marketSection.getMarketsectionid(), param);
+
+                systemmanagerService.writeOperateLog(SysConstants.PART_CODE_ORGZ, "修改版块, id=" + systemmanager.getLogincode(), systemmanager, null, null, null);
+            }
+
+        } else {
+            // 新增
+            Marketsection m = new Marketsection();
+            m.setMarketsectionname(param.getMarketsectionname());
+            m.setOrderindex(param.getOrderindex());
+            m.setRemark(param.getRemark());
+            m.setPictureurl(param.getPictureurl());
+            m.setCreatetime(new Date());
+            m.setCreatorid(systemmanager.getAutoid());
+            m.setCreatorsrc(1);
+            m.setModifytime(new Date());
+            m.setModifierid(systemmanager.getAutoid());
+            m.setModifiersrc(1);
+            m.setIsvalid(1);
+            m.setMarketsectionnameen(param.getMarketsectionnameen());
+            m.setMarketsectionnamezhTw(param.getMarketsectionnamezhtw());
+            m.setMarketsectionnameth(param.getMarketsectionnameth());
+            m.setMarketsectionnamevi(param.getMarketsectionnamevi());
+            iMarketsectionMapper.insert(m);
+
+            // 添加“MarketSectionConfigNew”表相关记录
+            addConfigNew(m.getMarketsectionid(), param);
+
+            systemmanagerService.writeOperateLog(SysConstants.PART_CODE_ORGZ, "新增版块, id=" + systemmanager.getLogincode(), systemmanager, null, null, null);
+
+        }
+
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public PageResult<Szdz2Imageconfig> querypicture(SystemPictureSetParam param, HttpServletRequest request) {
+        Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        if (systemmanager.getReletype().intValue() != SysConstants.SYS_TYPE_MANAGE) {
+            param.setAreauserid(systemmanager.getAreauserid());
+        }
+        IPage<Szdz2Imageconfig> page = new Page<>(param.getPageNum(), param.getPageSize());
+        IPage<Szdz2Imageconfig> resultIPage = iSzdz2ImageconfigMapper.selectPage(page, new QueryWrapper<Szdz2Imageconfig>()
+                .eq(param.getImagetype() != null, "imagetype", param.getImagetype())
+                .eq(param.getIsshow() != null, "isshow", param.getIsshow())
+                .eq(param.getAreauserid() != null, "areauserid", param.getAreauserid())
+                .like(StringUtils.isNotBlank(param.getTitle()), "title", param.getTitle()));
+        PageResult<Szdz2Imageconfig> pageResult = new PageResult<>();
+        pageResult.setCode(Constants.Success_Code_Design);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
+        pageResult.setPages(resultIPage.getPages());
+        pageResult.setCurrent(resultIPage.getCurrent());
+        pageResult.setTotal(resultIPage.getTotal());
+        pageResult.setPageSize(resultIPage.getSize());
+        pageResult.setData(resultIPage.getRecords());
+        return pageResult;
+    }
+
+    @Override
+    public AjaxResult<Szdz2Imageconfig> pictureDetail(Integer configid, HttpServletRequest request) {
+        Szdz2Imageconfig imageconfig = iSzdz2ImageconfigMapper.selectOne(new QueryWrapper<Szdz2Imageconfig>()
+                .eq("configid", configid));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), imageconfig);
+    }
+
+    @Override
+    public AjaxResult dealpicture(SystemPictureDealParam vo, HttpServletRequest request) {
+        Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        if (vo.getConfigid() != null) {
+            Szdz2Imageconfig sic = iSzdz2ImageconfigMapper.selectOne(new QueryWrapper<Szdz2Imageconfig>()
+                    .eq("configid", vo.getConfigid()));
+            sic.setTitle(vo.getTitle());
+            sic.setImagepath(vo.getImagepath());
+
+            sic.setUrltype(vo.getUrltype());
+
+            if (vo.getUrltype() == 1 || vo.getUrltype() == 4 || vo.getUrltype() == 5) {
+                sic.setUrl(vo.getUrl());
+            } else if (vo.getUrltype() == 2) {
+                sic.setUrl(vo.getUrl2());
+            }
+            sic.setSort(vo.getSort());
+            sic.setIsshow(vo.getIsshow());
+            sic.setUpdatedate(new Date());
+            sic.setModifierid(user.getAutoid());
+            sic.setImagedetailpath(vo.getImagedetailpath());
+            iSzdz2ImageconfigMapper.updateById(sic);
+        } else {
+            Szdz2Imageconfig sic = new Szdz2Imageconfig();
+            sic.setImagetype(1);
+            sic.setTitle(vo.getTitle());
+            sic.setImagepath(vo.getImagepath());
+            sic.setUrltype(vo.getUrltype());
+            if (vo.getUrltype() == 1 || vo.getUrltype() == 4 || vo.getUrltype() == 5) {
+                sic.setUrl(vo.getUrl());
+            } else if (vo.getUrltype() == 2) {
+                sic.setUrl(vo.getUrl2());
+            }
+
+            sic.setSort(vo.getSort());
+            sic.setIsshow(vo.getIsshow());
+            sic.setCreatedate(new Date());
+            sic.setCreatorid(user.getAutoid());
+            sic.setUpdatedate(new Date());
+            sic.setModifierid(user.getAreauserid());
+            sic.setAreauserid(user.getAreauserid());
+            sic.setImagedetailpath(vo.getImagedetailpath());
+            iSzdz2ImageconfigMapper.insert(sic);
+
+        }
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult deletepicture(Integer configid, HttpServletRequest request) {
+        iSzdz2ImageconfigMapper.delete(new QueryWrapper<Szdz2Imageconfig>()
+                .eq("configid", configid));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult<Map<Long, Object>> oaconfig(HttpServletRequest request) {
+        List<WskhOpenaccountconfig> list = iWskhOpenaccountconfigMapper.selectList(new QueryWrapper<>());
+        Map<Long, Object> map = new HashMap<>();
+        list.forEach(p -> {
+            map.put(p.getConfigid(), p.getConfigvalue());
+        });
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), map);
+    }
+
+    @Override
+    public AjaxResult oaconfigAdd(OaConfigParam param, HttpServletRequest request) {
+        Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        for (OaConfigAddParam paramParam : param.getParams()) {
+            WskhOpenaccountconfig openaccountconfig = iWskhOpenaccountconfigMapper.selectOne(new QueryWrapper<WskhOpenaccountconfig>().eq("configid", paramParam.getConfigid()));
+            openaccountconfig.setConfigvalue(paramParam.getConfigvalue());
+            iWskhOpenaccountconfigMapper.update(openaccountconfig, new QueryWrapper<WskhOpenaccountconfig>().eq("configid", paramParam.getConfigid()));
+        }
+        systemmanagerService.writeOperateLog(SysConstants.WSKH_CONFIG, "修改参数, id=" + user.getLogincode(), user, null, null, null);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult<TreeNode> divisiontree(HttpServletRequest request) {
+        List<Division> divisions = iDivisionMapper.selectList(new QueryWrapper<Division>().in("divisionlevel", "country", "province", "city"));
+        List<TreeNode> treeNodes = changeDivToTreeNode(divisions);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), treeNodes);
+    }
+
+    @Override
+    public AjaxResult<Division> queryAreaByCondition(HttpServletRequest request, String parentcode) {
+        List<Division> divisions = iDivisionMapper.selectList(new QueryWrapper<Division>().eq("parentcode", parentcode));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), divisions);
+    }
+
+    @Override
+    public AjaxResult<Division> getParentByAreacode(HttpServletRequest request, String parentcode) {
+        Division division = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("divisioncode", parentcode));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), division);
+    }
+
+    @Override
+    public AjaxResult dealDiv(HttpServletRequest request, DivisionAddParam param) {
+        Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        Division areaisexit = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("divisioncode", param.getDivisioncode()));
+        Division areaisexit2 = iDivisionMapper.selectOne(new QueryWrapper<Division>()
+                .eq("divisionname", param.getDivisionname())
+                .eq("parentcode", param.getParentcode()));
+        if (param.getAutoid() != null) {
+            Division div = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("autoid", param.getAutoid()));
+            if (areaisexit != null && !param.getDivisioncode().equals(div.getDivisioncode())) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM023.getCode(), request.getHeader("Accept-Language"));
+            }
+            if (areaisexit2 != null && !param.getDivisionname().equals(div.getDivisionname())) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM024.getCode(), request.getHeader("Accept-Language"));
+            }
+            update(param, user, div);
+        } else {
+            if (areaisexit != null) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM023.getCode(), request.getHeader("Accept-Language"));
+            }
+            if (areaisexit2 != null) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM024.getCode(), request.getHeader("Accept-Language"));
+            }
+            add(param, user);
+        }
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    @Override
+    public AjaxResult deleteDiv(HttpServletRequest request, Long areaid) {
+        Division area = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("autoid",areaid));
+        // 三级菜单,直接delete
+        if(("district").equals(area.getDivisionlevel()))
+            iDivisionMapper.delete(new QueryWrapper<Division>().eq("autoid",areaid));
+        // 二级菜单,删除时需先删掉三级菜单      一级菜单,删除时需先删掉二级菜单
+        if(("province").equals(area.getDivisionlevel()) || ("city").equals(area.getDivisionlevel())){
+            List<Division> aList = iDivisionMapper.selectList(new QueryWrapper<Division>().eq("parentcode", area.getDivisioncode()));
+            if (!aList.isEmpty()) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM025.getCode(), request.getHeader("Accept-Language"));
+            }else {
+                iDivisionMapper.delete(new QueryWrapper<Division>().eq("autoid",areaid));
+            }
+        }
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
+    }
+
+    private void update(DivisionAddParam param, Systemmanager user, Division div) {
+        String oldDivisionCode = div.getDivisioncode();
+        div.setDivisioncode(param.getDivisioncode());
+        div.setDivisionname(param.getDivisionname());
+        div.setModifytime(new Date());
+        div.setModifierid(user.getAutoid());
+
+        // 修改一级菜单province
+        if (("province").equals(div.getDivisionlevel())) {
+            div.setPathname(param.getDivisionname());
+            div.setSeparablename(param.getDivisionname());
+        }
+        // 修改二级菜单city
+        if (("city").equals(div.getDivisionlevel())) {
+            Division parentArea = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("divisioncode", div.getParentcode()));
+            div.setPathname(parentArea.getDivisionname() + param.getDivisionname());
+            div.setSeparablename(parentArea.getDivisionname() + ">" + param.getDivisionname());
+        }
+        // 修改二级菜单district
+        if (("district").equals(div.getDivisionlevel())) {
+            Division parentArea = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("divisioncode", div.getParentcode()));
+            div.setPathname(parentArea.getPathname() + param.getDivisionname());
+            div.setSeparablename(parentArea.getSeparablename() + ">" + param.getDivisionname());
+        }
+
+        iDivisionMapper.update(div, new QueryWrapper<Division>().eq("autoid", div.getAutoid()));
+
+        // divisioncode变更时,须更新下一级的parentcode 20240614
+        if (!oldDivisionCode.equals(param.getDivisioncode())) {
+            iDivisionMapper.updateByParentCode(oldDivisionCode, param.getDivisioncode());
+        }
+    }
+
+    private void add(DivisionAddParam param, Systemmanager user) {
+        Division div = new Division();
+        div.setDivisioncode(param.getDivisioncode());
+        div.setDivisionname(param.getDivisionname());
+        div.setParentcode(param.getParentcode());
+        // 获取其父类
+        Division parentArea = iDivisionMapper.selectOne(new QueryWrapper<Division>().eq("divisioncode", param.getParentcode()));
+        String parentLevel = "";
+        if (parentArea != null) {
+            // 国家为初始化,不支持手动添加上级为NULL的记录
+            parentLevel = parentArea.getDivisionlevel();
+
+            if ("country".equals(parentLevel)) {
+                div.setDivisionlevel("province");
+                div.setSeparablename(param.getDivisionname());
+                div.setPathname(param.getDivisionname());
+            }
+            if ("province".equals(parentLevel)) {
+                div.setDivisionlevel("city");
+                div.setSeparablename(parentArea.getDivisionname() + ">" + param.getDivisionname());
+                div.setPathname(parentArea.getPathname() + param.getDivisionname());
+            }
+            if ("city".equals(parentLevel)) {
+                div.setDivisionlevel("district");
+                div.setSeparablename(parentArea.getSeparablename() + ">" + param.getDivisionname());
+                div.setPathname(parentArea.getPathname() + param.getDivisionname());
+            }
+
+            div.setModifytime(new Date());
+            div.setModifierid(user.getAutoid());
+            iDivisionMapper.insert(div);
+        }
+    }
+
+    private List<TreeNode> changeDivToTreeNode(List<Division> divisions) {
+        List<TreeNode> node = new ArrayList<>();
+        if (divisions == null || divisions.isEmpty()) {
+            return node;
+        }
+        Map<String, List<Division>> treeMap = new HashMap<>();
+        for (Division dis : divisions) {
+            //一级菜单
+            if (dis.getParentcode() == null || dis.getParentcode().trim().isEmpty()) {
+                //开始存入
+                if (treeMap.containsKey("0")) {
+                    treeMap.get("0").add(dis);
+                } else {
+                    List<Division> temp = new ArrayList<>();
+                    temp.add(dis);
+                    treeMap.put("0", temp);
+                }
+            } else {
+                //二级菜单
+                if (treeMap.containsKey(dis.getParentcode())) {
+                    treeMap.get(dis.getParentcode()).add(dis);
+                } else {
+                    List<Division> temp = new ArrayList<>();
+                    temp.add(dis);
+                    treeMap.put(dis.getParentcode(), temp);
+                }
+            }
+        }
+        //一级菜单
+        List<Division> first = treeMap.get("0");
+        TreeNode node_ = null;
+        if (first != null && !first.isEmpty()) {
+            for (Division menu_ : first) {
+                //设置一级菜单
+                node_ = initTreeNode(menu_);
+                //设置一级菜单以下的所有菜单
+                loadChild(treeMap, node_);
+                //添加菜单
+                if (node_.getChildren() != null && !node_.getChildren().isEmpty()) {
+                    node.add(node_);
+                } else if (org.springframework.util.StringUtils.isEmpty(node_.getParentCode())) {
+                    node.add(node_);
+                }
+            }
+        }
+
+        return node;
+    }
+
+    private void loadChild(Map<String, List<Division>> treeMap, TreeNode parent) {
+        String parentid = parent.getResourceCode();
+        if (parentid == null) {
+            return;
+        }
+        List<TreeNode> nodechilds = new ArrayList<TreeNode>();
+        if (treeMap.containsKey(parentid)) {
+            //设置二级菜单
+            List<Division> list = treeMap.get(parentid);
+            for (Division menu : list) {
+                TreeNode node = initTreeNode(menu);
+                //设置三级菜单
+                loadChild(treeMap, node);
+                nodechilds.add(node);
+            }
+            parent.setChildren(nodechilds);
+        } else {
+            parent.setChildren(new ArrayList<>());
+        }
+    }
+
+    private TreeNode initTreeNode(Division dis) {
+        TreeNode node = new TreeNode();
+        node.setParentCode(Optional.ofNullable(dis.getParentcode()).orElse(""));
+        node.setTitle(dis.getDivisionname());
+        node.setResourceCode(dis.getDivisioncode());
+        node.setPathname(dis.getPathname());
+        return node;
+    }
+
+    private void addConfigNew(Long marketsectionid, SystemMarketSectionAddParam param) {
+// 添加“MarketSectionConfigNew”表相关记录
+        if (CollectionUtils.isNotEmpty(param.getList())) {
+            for (SystemMarketSectionAddMarket c : param.getList()) {
+                Marketsectionconfignew ms = new Marketsectionconfignew();
+                ms.setMarketsectionid(marketsectionid);
+                ms.setOrderindex(c.getOrderindex());
+                ms.setDisplayname(c.getDisplayname());
+                ms.setMarketids(c.getMarketids());
+                ms.setUpdatetime(new Date());
+                ms.setTrademode(c.getTrademode());
+                ms.setDisplaynameen(c.getDisplaynameen());
+                ms.setDisplaynamezhTw(c.getDisplaynamezhtw());
+                ms.setDisplaynameth(c.getDisplaynameth());
+                ms.setDisplaynamevi(c.getDisplaynamevi());
+                iMarketsectionconfignewMapper.insert(ms);
+            }
+        }
     }
 
     private void updateTerminalSysParam(SystemParamUpdate sysparm, Systemmanager systemmanager, Systemparam old) {

+ 2 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/vo/TreeNode.java

@@ -39,6 +39,8 @@ public class TreeNode implements Serializable {
     private Integer show;
     @ApiModelProperty(value = "备注")
     private String remark;
+    @ApiModelProperty(value = "地区菜单用")
+    private String pathname;
     @ApiModelProperty(value = "子节点")
     private List<TreeNode> children;
 }

+ 3 - 0
mtp3-century/src/main/resources/mapper/DivisionMapper.xml

@@ -21,6 +21,9 @@
     <sql id="Base_Column_List">
         AUTOID, DIVISIONCODE, SHORTCODE, PARENTCODE, DIVISIONLEVEL, DIVISIONNAME, PATHNAME, SEPARABLENAME, POSTCODE, MODIFYTIME, MODIFIERID
     </sql>
+    <update id="updateByParentCode">
+        UPDATE DIVISION SET PARENTCODE = #{newcode, jdbcType=VARCHAR} WHERE PARENTCODE = #{oldcode, jdbcType=VARCHAR}
+    </update>
 
     <select id="getProvince" resultMap="BaseResultMap">
         select autoid,divisionname from division where 1=1

+ 22 - 0
mtp3-century/src/main/resources/mapper/ISystemRunService.xml

@@ -274,6 +274,9 @@
             <!-- or vlog.LOGINIDS like '%' || #{accountname,jdbcType=VARCHAR} || '%' -->
             )
         </if>
+        <if test="usertype != null and usertype != '' ">
+            and ua.usertype = #{usertype}
+        </if>
         <if test="areaUserId != null and areaUserId != 1 ">
             START WITH ua.userid = #{areaUserId}
             CONNECT BY PRIOR ua.userid = ua.parentuserid
@@ -398,4 +401,23 @@
         </choose>
         )
     </select>
+    <select id="getMonitorInvestorsByAccPos" resultType="com.muchinfo.mtp3pojos.vo.marketrun.TaaccountMonitorVo"
+            parameterType="com.muchinfo.mtp3pojos.vo.marketrun.MarketRunPositionCountParam">
+        select t.*,
+        u.usertype,
+        u.userid,
+        u.accountname useraccountname,
+        u.parentuserid,
+        u.memberuserid,
+        u.broker,
+        v.loginids  loginid
+        from taaccount t
+        left join useraccount u on t.userid = u.userid
+        left join useraccount ua on ua.userid = u.memberuserid
+        left join VIEW_USER_LOGINIDS v on t.userid = v.userid
+        where 1 = 1
+        <if test="vo.goodsid != null and vo.goodsid !=''">
+            and t.accountid in (select accountid from tradeposition tp where tp.goodsid = #{vo.goodsid})
+        </if>
+    </select>
 </mapper>

+ 12 - 0
mtp3-century/src/main/resources/mapper/MarketMapper.xml

@@ -155,4 +155,16 @@
         </if>
         order by m.marketid
     </select>
+    <select id="queryTradeModeListNew" resultType="com.muchinfo.mtp3pojos.entity.Market">
+        select distinct m.marketid,m.marketname,m.trademode
+        from  market m
+        where m.markettype = 2
+        and m.marketstatus =2
+        and m.trademode not in(15, 45)
+        and m.marketid not in(
+        SELECT distinct REGEXP_SUBSTR(mscn.marketids, '[^,]+', 1, LEVEL) AS marketid
+        FROM MarketSectionConfignew mscn
+        CONNECT BY REGEXP_SUBSTR(mscn.marketids, '[^,]+', 1, LEVEL) IS NOT NULL)
+        order by m.trademode
+    </select>
 </mapper>

+ 8 - 0
mtp3-century/src/main/resources/mapper/SystemmanagerMapper.xml

@@ -364,4 +364,12 @@
         from i18nconfig
         where isvalid = 1
     </select>
+
+    <delete id="deletemarketSet" parameterType="java.lang.Integer">
+        begin
+            delete from MarketSection ms where ms.marketsectionid = #{marketsectionid};
+            delete from MarketSectionConfigNew mscn where mscn.marketsectionid = #{marketsectionid};
+            commit;
+        end;
+    </delete>
 </mapper>

+ 104 - 0
mtp3-century/src/main/resources/mapper/TradeOrderdetailMapper.xml

@@ -2412,4 +2412,108 @@
         </where>
         order by t.applytime desc
     </select>
+    <select id="querySumClosePL" resultType="com.muchinfo.mtp3pojos.vo.marketrun.TradeCloseDetailParam"
+            parameterType="com.muchinfo.mtp3pojos.vo.marketrun.TradeCloseDetailParam">
+        select sum(t.closepl) "closepl"
+        from TRADE_CLOSEDETAIL t
+        <where>
+            <if test="vo.accountid != null and vo.accountid != ''">
+                and t.accountid = #{vo.accountid}
+            </if>
+            <if test="vo.goodsid != null and vo.goodsid != ''">
+                and t.goodsid = #{vo.goodsid}
+            </if>
+            <if test="vo.excludeaccountids!=null and vo.excludeaccountids.length>0">
+                <foreach collection="vo.excludeaccountids" item="item" open=" and t.accountid not in (" close=")"
+                         separator=",">
+                    ${item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+    <select id="monitorHoldDetail" resultType="com.muchinfo.mtp3pojos.vo.marketrun.MarketRunPositionResult">
+        select
+        t.tradeid,
+        t.accountid,
+        t.buyorsell,
+        t.holderqty,
+        t.goodsid,t.marketid,
+        t.holderprice,
+        t.openprice,
+        t.holderamount,
+        t.tradetime,t.holderdays,
+        t.tradeproperty,
+        t.premium,t.optiontype,
+        t.expiretype,t.expirecycle,t.expiredate,
+        to_char(to_date(t.tradedate,'yyyy-MM-dd'),'yyyy-MM-dd') as tradedate1,
+        m.marketname,
+        la.loginids loginids,
+        ua.usertype,
+        ua.userid as uuserid,
+        ua.userid as userid,
+        g.goodscode,g.goodsname,
+        rua.accountname,
+        '0' as histradedate,
+        0 as ishis,
+        t.isPreExercise,
+        t.preExercisePrice,
+        t.isConfirmExercise,
+        t.holdercredit,
+        t.releaseholdercredit,
+        t.openqty,
+        g.agreeUnit,
+        m.trademode,
+        g.decimalplace,
+        ta.accountname taaccountname
+        from trade_holderdetail t
+        left join goods g on t.goodsid = g.goodsid
+        left join taaccount ta on ta.accountid = t.accountid
+        left join useraccount ua on ta.userid = ua.userid
+        left join useraccount rua on ta.relateduserid = rua.userid
+        left join market m on t.marketid = m.marketid
+        left join VIEW_USER_LOGINIDS la on ta.userid = la.userid
+        where t.holderqty > 0
+        <if test="vo.buyorsell != null">
+            and t.buyorsell = #{vo.buyorsell}
+        </if>
+        <if test="vo.goodsid != null and vo.goodsid != ''">
+            and t.goodsid = #{vo.goodsid}
+        </if>
+
+        <if test="vo.accountid != null and vo.accountid != ''">
+            and t.accountid = #{vo.accountid}
+        </if>
+
+        <if test="vo.excludeaccountidarray!=null and vo.excludeaccountidarray.length>0">
+            <foreach collection="vo.excludeaccountidarray" item="item" open="and t.accountid not in (" close=")"
+                     separator=",">
+                ${item}
+            </foreach>
+        </if>
+
+        <if test="vo.includeaccountidarray!=null and vo.includeaccountidarray.length>0">
+            <foreach collection="vo.includeaccountidarray" item="item" open="and t.accountid in (" close=")"
+                     separator=",">
+                ${item}
+            </foreach>
+        </if>
+
+        <choose>
+            <when test="vo.orderby != null and vo.orderby == 3">
+                order by t.holderqty desc, t.tradetime desc, t.accountid desc
+            </when>
+            <when test="vo.orderby != null and vo.orderby == 4">
+                order by t.holderqty asc, t.tradetime desc, t.accountid desc
+            </when>
+            <when test="vo.orderby != null and vo.orderby == 5">
+                order by t.holderprice desc, t.tradetime desc, t.accountid desc
+            </when>
+            <when test="vo.orderby != null and vo.orderby == 6">
+                order by t.holderprice asc, t.tradetime desc, t.accountid desc
+            </when>
+            <otherwise>
+                order by t.tradetime desc,t.accountid desc
+            </otherwise>
+        </choose>
+    </select>
 </mapper>

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

@@ -48,6 +48,11 @@ message_error_code_system017=Deposit transfer market, please select the issuer o
 message_error_code_system018=Please execute when the system completes processing successfully at the end of the day
 message_error_code_system019=The role name is referenced, please remove the reference first
 message_error_code_system020=Verification code error
+message_error_code_system021=The exchange rate already exists
+message_error_code_system022=The exchange rate does not exist
+message_error_code_system023=Duplicate region code
+message_error_code_system024=Duplicate region names
+message_error_code_system025=Delete failed, please delete its sub regions first
 login_error_code_001=Account or password error
 login_error_code_002=Unauthorized access is not allowed! Please contact the administrator to handle it!
 login_error_code_003=Login locked!

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

@@ -48,6 +48,11 @@ message_error_code_system017=\u0E15\u0E25\u0E32\u0E14\u0E42\u0E2D\u0E19\u0E40\u0
 message_error_code_system018=\u0E42\u0E1B\u0E23\u0E14\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08
 message_error_code_system019=\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E25\u0E30\u0E04\u0E23\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E42\u0E1B\u0E23\u0E14\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E01\u0E32\u0E23\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E01\u0E48\u0E2D\u0E19
 message_error_code_system020=\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E02\u0E2D\u0E07\u0E23\u0E2B\u0E31\u0E2A\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19
+message_error_code_system021=\u0E2D\u0E31\u0E15\u0E23\u0E32\u0E41\u0E25\u0E01\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E19\u0E35\u0E49\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27
+message_error_code_system022=\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E31\u0E15\u0E23\u0E32\u0E41\u0E25\u0E01\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E19\u0E35\u0E49
+message_error_code_system023=\u0E23\u0E2B\u0E31\u0E2A\u0E40\u0E02\u0E15 \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19
+message_error_code_system024=\u0E0A\u0E37\u0E48\u0E2D\u0E20\u0E32\u0E04 \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19
+message_error_code_system025=\u0E01\u0E32\u0E23\u0E25\u0E1A\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E42\u0E1B\u0E23\u0E14\u0E25\u0E1A\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E22\u0E48\u0E2D\u0E22\u0E01\u0E48\u0E2D\u0E19
 login_error_code_001=\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07
 login_error_code_002=\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15! \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23!
 login_error_code_003=\u0E25\u0E47\u0E2D\u0E01\u0E2D\u0E34\u0E19!

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

@@ -48,6 +48,11 @@ message_error_code_system017=th\u1ECB tr\u01B0\u1EDDng chuy\u1EC3n nh\u01B0\u1EE
 message_error_code_system018=Vui l\u00F2ng th\u1EF1c hi\u1EC7n khi h\u1EC7 th\u1ED1ng x\u1EED l\u00FD th\u00E0nh c\u00F4ng v\u00E0o cu\u1ED1i ng\u00E0y
 message_error_code_system019=T\u00EAn nh\u00E2n v\u1EADt \u0111\u00E3 \u0111\u01B0\u1EE3c tr\u00EDch d\u1EABn, vui l\u00F2ng h\u1EE7y tham chi\u1EBFu tr\u01B0\u1EDBc
 message_error_code_system020=L\u1ED7i CAPTCHA
+message_error_code_system021=T\u1EF7 gi\u00E1 h\u1ED1i \u0111o\u00E1i hi\u1EC7n c\u00F3
+message_error_code_system022=T\u1EF7 gi\u00E1 h\u1ED1i \u0111o\u00E1i kh\u00F4ng t\u1ED3n t\u1EA1i
+message_error_code_system023=M\u00E3 v\u00F9ng l\u1EB7p l\u1EA1i
+message_error_code_system024=T\u00EAn mi\u1EC1n tr\u00F9ng l\u1EB7p
+message_error_code_system025=X\u00F3a kh\u00F4ng th\u00E0nh c\u00F4ng, tr\u01B0\u1EDBc ti\u00EAn h\u00E3y x\u00F3a khu v\u1EF1c con c\u1EE7a n\u00F3
 login_error_code_001=L\u1ED7i t\u00E0i kho\u1EA3n ho\u1EB7c m\u1EADt kh\u1EA9u
 login_error_code_002=Kh\u00F4ng \u0111\u01B0\u1EE3c ph\u00E9p, kh\u00F4ng th\u1EC3 truy c\u1EADp! Vui l\u00F2ng li\u00EAn h\u1EC7 v\u1EDBi qu\u1EA3n tr\u1ECB vi\u00EAn \u0111\u1EC3 x\u1EED l\u00FD!
 login_error_code_003=Kh\u00F3a \u0111\u0103ng nh\u1EADp!

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

@@ -48,6 +48,11 @@ message_error_code_system017=\u5B9A\u91D1\u8F6C\u8BA9\u5E02\u573A\uFF0C\u8BF7\u9
 message_error_code_system018=\u8BF7\u4E8E\u7CFB\u7EDF\u65E5\u7EC8\u5904\u7406\u6210\u529F\u65F6\u6267\u884C
 message_error_code_system019=\u8BE5\u89D2\u8272\u540D\u79F0\u88AB\u5F15\u7528,\u8BF7\u5148\u89E3\u9664\u5F15\u7528
 message_error_code_system020=\u9A8C\u8BC1\u7801\u9519\u8BEF
+message_error_code_system021=\u8BE5\u6C47\u7387\u5DF2\u5B58\u5728
+message_error_code_system022=\u8BE5\u6C47\u7387\u4E0D\u5B58\u5728
+message_error_code_system023=\u5730\u533A\u4EE3\u7801\u91CD\u590D
+message_error_code_system024=\u5730\u533A\u540D\u79F0\u91CD\u590D
+message_error_code_system025=\u5220\u9664\u5931\u8D25,\u8BF7\u5148\u5C06\u5176\u5B50\u5730\u533A\u5220\u9664
 login_error_code_001=\u8D26\u6237\u6216\u5BC6\u7801\u9519\u8BEF
 login_error_code_002=\u672A\u7ECF\u5141\u8BB8\uFF0C\u4E0D\u53EF\u8BBF\u95EE\uFF01\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5904\u7406\uFF01
 login_error_code_003=\u767B\u5F55\u9501\u5B9A\uFF01

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

@@ -48,6 +48,11 @@ message_error_code_system017=\u5B9A\u91D1\u8F49\u8B93\u5E02\u5834\uFF0C\u8ACB\u9
 message_error_code_system018=\u8ACB\u65BC\u7CFB\u7D71\u65E5\u7D42\u8655\u7406\u6210\u529F\u6642\u57F7\u884C
 message_error_code_system019=\u8A72\u89D2\u8272\u540D\u7A31\u88AB\u5F15\u7528\uFF0C\u8ACB\u5148\u89E3\u9664\u5F15\u7528
 message_error_code_system020=\u9A57\u8B49\u78BC\u932F\u8AA4
+message_error_code_system021=\u8A72\u532F\u7387\u5DF2\u5B58\u5728
+message_error_code_system022=\u8A72\u532F\u7387\u4E0D\u5B58\u5728
+message_error_code_system023=\u5730\u5340\u7A0B\u5F0F\u78BC\u91CD\u8907
+message_error_code_system024=\u5730\u533A\u540D\u79F0\u91CD\u590D
+message_error_code_system025=\u5220\u9664\u5931\u8D25,\u8BF7\u5148\u5C06\u5176\u5B50\u5730\u533A\u5220\u9664
 login_error_code_001=\u5E33\u6236\u6216\u5BC6\u78BC\u932F\u8AA4
 login_error_code_002=\u672A\u7D93\u5141\u8A31\uFF0C\u4E0D\u53EF\u8A2A\u554F\uFF01 \u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\u8655\u7406\uFF01
 login_error_code_003=\u767B\u5165\u9396\u5B9A\uFF01

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

@@ -48,6 +48,11 @@ message_error_code_system017=\u5B9A\u91D1\u8F49\u8B93\u5E02\u5834\uFF0C\u8ACB\u9
 message_error_code_system018=\u8ACB\u65BC\u7CFB\u7D71\u65E5\u7D42\u8655\u7406\u6210\u529F\u6642\u57F7\u884C
 message_error_code_system019=\u8A72\u89D2\u8272\u540D\u7A31\u88AB\u5F15\u7528\uFF0C\u8ACB\u5148\u89E3\u9664\u5F15\u7528
 message_error_code_system020=\u9A57\u8B49\u78BC\u932F\u8AA4
+message_error_code_system021=\u8A72\u532F\u7387\u5DF2\u5B58\u5728
+message_error_code_system022=\u8A72\u532F\u7387\u4E0D\u5B58\u5728
+message_error_code_system023=\u5730\u5340\u7A0B\u5F0F\u78BC\u91CD\u8907
+message_error_code_system024=\u5730\u5340\u540D\u7A31\u91CD\u8907
+message_error_code_system025=\u5220\u9664\u5931\u6557\uFF0C\u8ACB\u5148\u5C07\u5176\u5B50\u5730\u5340\u5220\u9664
 login_error_code_001=\u5E33\u6236\u6216\u5BC6\u78BC\u932F\u8AA4
 login_error_code_002=\u672A\u7D93\u5141\u8A31\uFF0C\u4E0D\u53EF\u8A2A\u554F\uFF01 \u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\u8655\u7406\uFF01
 login_error_code_003=\u767B\u5165\u9396\u5B9A\uFF01

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

@@ -56,6 +56,11 @@ public enum MessageType {
     MESSAGE_ERROR_CODE_SYSTEM018("message_error_code_system018", "请于系统日终处理成功时执行"),
     MESSAGE_ERROR_CODE_SYSTEM019("message_error_code_system019", "该角色名称被引用,请先解除引用"),
     MESSAGE_ERROR_CODE_SYSTEM020("message_error_code_system020", "验证码错误"),
+    MESSAGE_ERROR_CODE_SYSTEM021("message_error_code_system021", "该汇率已存在"),
+    MESSAGE_ERROR_CODE_SYSTEM022("message_error_code_system022", "该汇率不存在"),
+    MESSAGE_ERROR_CODE_SYSTEM023("message_error_code_system023", "地区代码重复"),
+    MESSAGE_ERROR_CODE_SYSTEM024("message_error_code_system024", "地区名称重复"),
+    MESSAGE_ERROR_CODE_SYSTEM025("message_error_code_system025", "删除失败,请先将其子地区删除"),
 
     LOGIN_ERROR_CODE_001("login_error_code_001", "账户或密码错误"),
     LOGIN_ERROR_CODE_002("login_error_code_002", "未经允许,不可访问!请联系管理员处理"),

+ 50 - 0
mtp3-common/src/main/java/com/muchinfo/mtp3common/utils/CommonUtil.java

@@ -5,6 +5,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.servlet.http.HttpServletRequest;
+import java.beans.PropertyDescriptor;
 import java.io.File;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Field;
@@ -682,4 +683,53 @@ public class CommonUtil {
             return sb.toString();
         }
     }
+
+    /**
+     * 单字段排序、可倒序
+     */
+    public static <T> void sortByField(List<T> list, String fieldName, Boolean isAsc) {
+        if (list == null) {
+            return;
+        }
+
+        Collections.sort(list, new Comparator<T>() {
+            @Override
+            public int compare(T o1, T o2) {
+                try {
+                    Class<?> clazz = o1.getClass();
+                    PropertyDescriptor pd = new PropertyDescriptor(fieldName, clazz);
+                    Method readMethod = pd.getReadMethod();
+                    Object value1 = readMethod.invoke(o1);
+                    Object value2 = readMethod.invoke(o2);
+                    int compareValue = 0;
+                    if (value1 instanceof Integer) {
+                        compareValue = Integer.compare((Integer) value1, (Integer) value2);
+                        if (!isAsc) {
+                            compareValue = Integer.compare((Integer) value2, (Integer) value1);
+                        }
+                    } else if (value1 instanceof String) {
+                        compareValue = ((String) value1).compareTo((String) value2);
+                        if (!isAsc) {
+                            compareValue = ((String) value2).compareTo((String) value1);
+                        }
+                    } else if (value1 instanceof Double) {
+                        compareValue = Double.compare((Double) value1, (Double) value2);
+                        if (!isAsc) {
+                            compareValue = Double.compare((Double) value2, (Double) value1);
+                        }
+                    } else if (value1 instanceof BigDecimal) {
+                        compareValue = ((BigDecimal) value1).compareTo((BigDecimal) value2);
+                        if (!isAsc) {
+                            compareValue = ((BigDecimal) value2).compareTo((BigDecimal) value1);
+                            ;
+                        }
+                    }
+                    return compareValue;
+                } catch (Exception e) {
+                    logger.error(e.getMessage());
+                }
+                return 0;
+            }
+        });
+    }
 }

+ 4 - 2
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IDivisionMapper.java

@@ -18,7 +18,9 @@ import java.util.List;
 @Mapper
 public interface IDivisionMapper extends BaseMapper<Division> {
 
-    List<Division> getProvince(@Param("autoid") Long autoid,@Param("divisionlevel") String divisionlevel);
+    List<Division> getProvince(@Param("autoid") Long autoid, @Param("divisionlevel") String divisionlevel);
 
-    String selectAreaPathName(@Param("districtid")Long districtid);
+    String selectAreaPathName(@Param("districtid") Long districtid);
+
+    void updateByParentCode(@Param("oldcode") String oldDivisionCode, @Param("newcode") String divisioncode);
 }

+ 16 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IExchangerateconfigMapper.java

@@ -0,0 +1,16 @@
+package com.muchinfo.mtp3interface.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muchinfo.mtp3pojos.entity.Exchangerateconfig;
+
+/**
+ * <p>
+ * 汇率配置表 Mapper 接口
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-12
+ */
+public interface IExchangerateconfigMapper extends BaseMapper<Exchangerateconfig> {
+
+}

+ 2 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketMapper.java

@@ -36,4 +36,6 @@ public interface IMarketMapper extends BaseMapper<Market> {
     List<Market> getNoTradeConfigMarketsForAccount(@Param("vo") PersonalizationDelParam param);
 
     List<Market> queryoperatemarkets(@Param("areauserid") Long areauserid);
+
+    List<Market> queryTradeModeListNew();
 }

+ 16 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketsectionMapper.java

@@ -0,0 +1,16 @@
+package com.muchinfo.mtp3interface.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muchinfo.mtp3pojos.entity.Marketsection;
+
+/**
+ * <p>
+ * MarketSection Mapper 接口
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-08
+ */
+public interface IMarketsectionMapper extends BaseMapper<Marketsection> {
+
+}

+ 16 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/IMarketsectionconfignewMapper.java

@@ -0,0 +1,16 @@
+package com.muchinfo.mtp3interface.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muchinfo.mtp3pojos.entity.Marketsectionconfignew;
+
+/**
+ * <p>
+ * 市场版块配置表(新) - 脚本初始化 Mapper 接口
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-08
+ */
+public interface IMarketsectionconfignewMapper extends BaseMapper<Marketsectionconfignew> {
+
+}

+ 3 - 4
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ISystemmanagerMapper.java

@@ -9,10 +9,7 @@ import com.muchinfo.mtp3pojos.vo.organ.UserAccountOrgan2UserResult;
 import com.muchinfo.mtp3pojos.vo.organ.UserAccountSelfsupportParam;
 import com.muchinfo.mtp3pojos.vo.organ.UserAccountSelfsupportResult;
 import com.muchinfo.mtp3pojos.vo.systemrun.*;
-import com.muchinfo.mtp3pojos.vo.systemsetup.ListMarketSectionConfig;
-import com.muchinfo.mtp3pojos.vo.systemsetup.SystemMarketSectionParam;
-import com.muchinfo.mtp3pojos.vo.systemsetup.SystemMarketSectionResult;
-import com.muchinfo.mtp3pojos.vo.systemsetup.SystemMarketSetDetail;
+import com.muchinfo.mtp3pojos.vo.systemsetup.*;
 import com.muchinfo.mtp3pojos.vo.systemuser.SystemUserReqParam;
 import com.muchinfo.mtp3pojos.vo.systemuser.SystemUserResResult;
 import org.apache.ibatis.annotations.Mapper;
@@ -62,4 +59,6 @@ public interface ISystemmanagerMapper extends BaseMapper<Systemmanager> {
     List<ListMarketSectionConfig> queryMarketSectionConfigNewList(@Param("marketsectionid") Integer marketsectionid);
 
     List<I18nconfig> queryI18nConfigs();
+
+    void deletemarketSet(@Param("marketsectionid")Integer marketsectionid);
 }

+ 16 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ISzdz2ImageconfigMapper.java

@@ -0,0 +1,16 @@
+package com.muchinfo.mtp3interface.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muchinfo.mtp3pojos.entity.Szdz2Imageconfig;
+
+/**
+ * <p>
+ * 终端图片配置  - 通用功能 Mapper 接口
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-09
+ */
+public interface ISzdz2ImageconfigMapper extends BaseMapper<Szdz2Imageconfig> {
+
+}

+ 3 - 1
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ITaaccountMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.muchinfo.mtp3pojos.entity.Taaccount;
 import com.muchinfo.mtp3pojos.vo.common.TAAccountChildrenResult;
 import com.muchinfo.mtp3pojos.vo.investor.PersonalizationDelParam;
+import com.muchinfo.mtp3pojos.vo.marketrun.MarketRunPositionCountParam;
 import com.muchinfo.mtp3pojos.vo.marketrun.TaaccountMonitorVo;
 import com.muchinfo.mtp3pojos.vo.organ.UserAccountRoleParam;
 import com.muchinfo.mtp3pojos.vo.organ.UserAccountRspResult;
@@ -35,7 +36,7 @@ public interface ITaaccountMapper extends BaseMapper<Taaccount> {
 
     List<TaAccountAmountStreamResult> selectAmountStream(@Param("vo") TaAccountAmountStreamParam param);
 
-    List<TAAccountChildrenResult> queryTAAccountChildren(@Param("accountName") String accountName, @Param("areaUserId") Long areaUserId);
+    List<TAAccountChildrenResult> queryTAAccountChildren(@Param("accountName") String accountName, @Param("areaUserId") Long areaUserId, @Param("usertype") Integer usertype);
 
     List<RefUserResult> queryRefUserSelect(@Param("searchcode") String searchcode, @Param("refereeuserid") Long refereeuserid);
 
@@ -51,4 +52,5 @@ public interface ITaaccountMapper extends BaseMapper<Taaccount> {
 
     List<Long> getNoTradeConfigAccounts(@Param("vo") PersonalizationDelParam param);
 
+    List<TaaccountMonitorVo> getMonitorInvestorsByAccPos(@Param("vo") MarketRunPositionCountParam param);
 }

+ 7 - 0
mtp3-interface/src/main/java/com/muchinfo/mtp3interface/mapper/ITradeOrderdetailMapper.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.muchinfo.mtp3pojos.entity.TradeOrderdetail;
 import com.muchinfo.mtp3pojos.entity.Wrfactortypeitem;
 import com.muchinfo.mtp3pojos.vo.marketrun.MarketRunCutPositionResult;
+import com.muchinfo.mtp3pojos.vo.marketrun.MarketRunPositionCountParam;
+import com.muchinfo.mtp3pojos.vo.marketrun.MarketRunPositionResult;
+import com.muchinfo.mtp3pojos.vo.marketrun.TradeCloseDetailParam;
 import com.muchinfo.mtp3pojos.vo.query.accounttransaction.AccountTransactionQueryParam;
 import com.muchinfo.mtp3pojos.vo.query.accounttransaction.AccountTransactionQueryResult;
 import com.muchinfo.mtp3pojos.vo.query.commission.*;
@@ -136,4 +139,8 @@ public interface ITradeOrderdetailMapper extends BaseMapper<TradeOrderdetail> {
     IPage<InvestorQueryResult> queryinvestor(IPage<InvestorQueryResult> page, @Param("vo") InvestorQueryParam param);
 
     IPage<HoldtransferQueryResult> holdtransferquery(IPage<HoldtransferQueryResult> page, @Param("vo") HoldtransferQueryParam param);
+
+    TradeCloseDetailParam querySumClosePL(@Param("vo") TradeCloseDetailParam vo);
+
+    IPage<MarketRunPositionResult> monitorHoldDetail(IPage<MarketRunPositionResult> page, @Param("vo") MarketRunPositionCountParam param);
 }

+ 64 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Exchangerateconfig.java

@@ -0,0 +1,64 @@
+package com.muchinfo.mtp3pojos.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 汇率配置表
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("EXCHANGERATECONFIG")
+@ApiModel(value="Exchangerateconfig对象", description="汇率配置表")
+public class Exchangerateconfig extends Model<Exchangerateconfig> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "源币种ID")
+    private Integer oricurrencyid;
+
+    @ApiModelProperty(value = "目标币种ID")
+    @TableField("DESCURRENCYID")
+    private Integer descurrencyid;
+
+    @ApiModelProperty(value = "汇率")
+    @TableField("EXCHANGERATE")
+    private BigDecimal exchangerate;
+
+    @ApiModelProperty(value = "备注")
+    @TableField("REMARK")
+    private String remark;
+
+    @ApiModelProperty(value = "更新人")
+    @TableField("UPDATEBY")
+    private Long updateby;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField("UPDATETIME")
+    private Date updatetime;
+
+
+    @Override
+    public Serializable pkVal() {
+        return this.oricurrencyid;
+    }
+
+}

+ 103 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Marketsection.java

@@ -0,0 +1,103 @@
+package com.muchinfo.mtp3pojos.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * MarketSection
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("MARKETSECTION")
+@ApiModel(value="Marketsection对象", description="MarketSection")
+@KeySequence(value = "SEQ_MARKETSECTION")
+public class Marketsection extends Model<Marketsection> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "市场版块ID(SEQ_MARKETSECTION)")
+    @TableId(value = "MARKETSECTIONID", type = IdType.INPUT)
+    private Long marketsectionid;
+
+    @ApiModelProperty(value = "市场版块名称")
+    @TableField("MARKETSECTIONNAME")
+    private String marketsectionname;
+
+    @ApiModelProperty(value = "排序")
+    @TableField("ORDERINDEX")
+    private Integer orderindex;
+
+    @ApiModelProperty(value = "备注")
+    @TableField("REMARK")
+    private String remark;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField("CREATETIME")
+    private Date createtime;
+
+    @ApiModelProperty(value = "创建人来源 - 1:管理端 2:终端 3:交易")
+    @TableField("CREATORSRC")
+    private Integer creatorsrc;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("CREATORID")
+    private Long creatorid;
+
+    @ApiModelProperty(value = "修改人来源 - 1:管理端 2:终端")
+    @TableField("MODIFIERSRC")
+    private Integer modifiersrc;
+
+    @ApiModelProperty(value = "修改人")
+    @TableField("MODIFIERID")
+    private Long modifierid;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField("MODIFYTIME")
+    private Date modifytime;
+
+    @ApiModelProperty(value = "是否有效 - 0:无效 1:有效")
+    @TableField("ISVALID")
+    private Integer isvalid;
+
+    @ApiModelProperty(value = "显示图片(90*90)")
+    @TableField("PICTUREURL")
+    private String pictureurl;
+
+    @ApiModelProperty(value = "市场版块名称(英文)")
+    @TableField("MARKETSECTIONNAMEEN")
+    private String marketsectionnameen;
+
+    @ApiModelProperty(value = "市场版块名称(繁体)")
+    @TableField("MARKETSECTIONNAMEZH_TW")
+    private String marketsectionnamezhTw;
+
+    @ApiModelProperty(value = "市场版块名称(泰文)")
+    @TableField("MARKETSECTIONNAMETH")
+    private String marketsectionnameth;
+
+    @ApiModelProperty(value = "市场版块名称(越南语)")
+    @TableField("MARKETSECTIONNAMEVI")
+    private String marketsectionnamevi;
+
+
+    @Override
+    public Serializable pkVal() {
+        return this.marketsectionid;
+    }
+
+}

+ 80 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Marketsectionconfignew.java

@@ -0,0 +1,80 @@
+package com.muchinfo.mtp3pojos.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 市场版块配置表(新) - 脚本初始化
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("MARKETSECTIONCONFIGNEW")
+@ApiModel(value="Marketsectionconfignew对象", description="市场版块配置表(新) - 脚本初始化")
+public class Marketsectionconfignew extends Model<Marketsectionconfignew> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "市场版块ID(SEQ_MARKETSECTION)")
+    private Long marketsectionid;
+
+    @ApiModelProperty(value = "排序")
+    @TableField("ORDERINDEX")
+    private Integer orderindex;
+
+    @ApiModelProperty(value = "显示名称")
+    @TableField("DISPLAYNAME")
+    private String displayname;
+
+    @ApiModelProperty(value = "市场IDs - 逗号分隔")
+    @TableField("MARKETIDS")
+    private String marketids;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField("UPDATETIME")
+    private Date updatetime;
+
+    @ApiModelProperty(value = "交易模式")
+    @TableField("TRADEMODE")
+    private Integer trademode;
+
+    @ApiModelProperty(value = "显示名称(英文)")
+    @TableField("DISPLAYNAMEEN")
+    private String displaynameen;
+
+    @ApiModelProperty(value = "显示名称(繁体)")
+    @TableField("DISPLAYNAMEZH_TW")
+    private String displaynamezhTw;
+
+    @ApiModelProperty(value = "显示名称(泰文)")
+    @TableField("DISPLAYNAMETH")
+    private String displaynameth;
+
+    @ApiModelProperty(value = "显示名称(越南语)")
+    @TableField("DISPLAYNAMEVI")
+    private String displaynamevi;
+
+
+    @Override
+    public Serializable pkVal() {
+        return this.marketsectionid;
+    }
+
+}

+ 95 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/entity/Szdz2Imageconfig.java

@@ -0,0 +1,95 @@
+package com.muchinfo.mtp3pojos.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 终端图片配置  - 通用功能
+ * </p>
+ *
+ * @author XKF
+ * @since 2025-05-09
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("SZDZ2_IMAGECONFIG")
+@KeySequence(value = "SEQ_SZDZ2_IMAGECONFIG")
+@ApiModel(value="Szdz2Imageconfig对象", description="终端图片配置  - 通用功能")
+public class Szdz2Imageconfig extends Model<Szdz2Imageconfig> {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "配置ID(SEQ_SZDZ2_IMAGECONFIG)")
+    @TableId(value = "CONFIGID", type = IdType.INPUT)
+    private Long configid;
+
+    @ApiModelProperty(value = "类型 - 1:首页轮播(移动) 2:我的(移动) 3:首页(PC) ")
+    @TableField("IMAGETYPE")
+    private Integer imagetype;
+
+    @ApiModelProperty(value = "标题")
+    @TableField("TITLE")
+    private String title;
+
+    @ApiModelProperty(value = "图片")
+    @TableField("IMAGEPATH")
+    private String imagepath;
+
+    @ApiModelProperty(value = "链接(地址或商品ID)")
+    @TableField("URL")
+    private String url;
+
+    @ApiModelProperty(value = "排序")
+    @TableField("SORT")
+    private Integer sort;
+
+    @ApiModelProperty(value = "是否展示 - 0:不展示 1:展示")
+    @TableField("ISSHOW")
+    private Integer isshow;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField("CREATEDATE")
+    private Date createdate;
+
+    @ApiModelProperty(value = "创建人")
+    @TableField("CREATORID")
+    private Long creatorid;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField("UPDATEDATE")
+    private Date updatedate;
+
+    @ApiModelProperty(value = "操作人")
+    @TableField("MODIFIERID")
+    private Long modifierid;
+
+    @ApiModelProperty(value = "所属机构ID")
+    @TableField("AREAUSERID")
+    private Long areauserid;
+
+    @ApiModelProperty(value = "链接类型 - 0:无 1:直接地址 2:商品ID 3:图片详情 4:App功能 5:微信小程序 code:urltype")
+    @TableField("URLTYPE")
+    private Integer urltype;
+
+    @ApiModelProperty(value = "详情图片 [UrlType = 3时 有且必填,其它类型不需要]")
+    @TableField("IMAGEDETAILPATH")
+    private String imagedetailpath;
+
+
+    @Override
+    public Serializable pkVal() {
+        return this.configid;
+    }
+
+}

+ 46 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/MarketRunPositionCountParam.java

@@ -0,0 +1,46 @@
+package com.muchinfo.mtp3pojos.vo.marketrun;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "MarketRunPositionCountParam对象", description = "持仓汇总监控")
+public class MarketRunPositionCountParam {
+
+    @ApiModelProperty(value = "商品 ")
+    private Long goodsid;
+
+    @ApiModelProperty(value = "交易商 ")
+    private Long accountid;
+
+    @ApiModelProperty(value = "排序 ")
+    private Integer orderby;
+
+    @ApiModelProperty(value = "下次刷新 ")
+    private Integer refTimeInput;
+
+    @ApiModelProperty(value = "排除交易商 ")
+    private String excludeaccountids;
+
+    @ApiModelProperty(value = "指定交易商 ")
+    private String includeaccountids;
+
+    @ApiModelProperty(value = "* 页码 *")
+    private Long pageNum;
+
+    @ApiModelProperty(value = "* 页大小 *")
+    private Long pageSize;
+
+    private Integer buyorsell;
+
+    private String[] includeaccountidarray; // 包含账户ID --查询条件
+
+    private String[] excludeaccountidarray;  //排除账户ID --查询条件
+}

+ 60 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/MarketRunPositionResult.java

@@ -0,0 +1,60 @@
+package com.muchinfo.mtp3pojos.vo.marketrun;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "MarketRunPositionCountParam对象", description = "买卖持仓监控")
+public class MarketRunPositionResult {
+
+    @ApiModelProperty(value = "单号 ")
+    private String tradeid;
+
+    @ApiModelProperty(value = "交易日 ")
+    private String tradedate1;
+
+    @ApiModelProperty(value = "资金账户/账号/名称 ")
+    private String accountid;
+
+    private String loginids;
+
+    private String accountname;
+
+    @ApiModelProperty(value = "市场 ")
+    private String marketname;
+
+    @ApiModelProperty(value = "商品 ")
+    private String goodsname;
+
+    @ApiModelProperty(value = "方向 ")
+    private Integer buyorsell;
+
+    @ApiModelProperty(value = "持仓数量 ")
+    private Integer holderqty;
+
+    @ApiModelProperty(value = "持仓价格  ")
+    private BigDecimal holderprice;
+
+    @ApiModelProperty(value = "持仓金额 ")
+    private BigDecimal holderamount;
+
+    @ApiModelProperty(value = "浮动损益 ")
+    private BigDecimal actuallYplS;
+
+    @ApiModelProperty(value = "交易时间 ")
+    private Date tradetime;
+
+    private String goodscode;
+
+    private BigDecimal agreeUnit;
+}

+ 37 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/marketrun/TradeCloseDetailParam.java

@@ -0,0 +1,37 @@
+package com.muchinfo.mtp3pojos.vo.marketrun;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TradeCloseDetailParam {
+
+    private static final long serialVersionUID = 1L;
+    private Long accountid;
+    private Long goodsid;
+    private Integer pageNo;
+    private Integer pageSize;
+    private String marketname;
+    private String goodsname;
+    private String accountname;
+    private Integer trademode;
+    private Integer ishis;
+    private String histradedate;
+
+    private Long holderbuyorsell;
+    private Long userid;
+
+    private String[] excludeaccountids;
+
+    private String startdate;//开始日期
+    private String enddate;//结束日期
+    private BigDecimal closepl;
+}

+ 25 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemrun/SystemRateResult.java

@@ -0,0 +1,25 @@
+package com.muchinfo.mtp3pojos.vo.systemrun;
+
+import com.muchinfo.mtp3pojos.entity.Exchangerateconfig;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+import java.util.Map;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "SystemRateResult对象", description = "系统汇率管理")
+public class SystemRateResult {
+
+    private List<Exchangerateconfig> exchangerateconfig;
+
+    private Map<Object,Object> currencyMap;
+
+    private String descurrencyid;
+}

+ 1 - 1
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemrun/YmrslQueryResult.java

@@ -24,7 +24,7 @@ public class YmrslQueryResult {
     private String marketname;
 
     @ApiModelProperty(value = "运行类型")
-    private String runstatus;
+    private Integer runstatus;
 
     @ApiModelProperty(value = "备注")
     private String remark;

+ 23 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/DivisionAddParam.java

@@ -0,0 +1,23 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "DivisionAddParam对象", description = "配置")
+public class DivisionAddParam {
+
+    private Long autoid;
+
+    private String parentcode;
+
+    private String divisioncode;
+
+    private String divisionname;
+}

+ 19 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/OaConfigAddParam.java

@@ -0,0 +1,19 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "OaConfigAddParam对象", description = "配置")
+public class OaConfigAddParam {
+
+    private Long configid;
+
+    private String configvalue;
+}

+ 19 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/OaConfigParam.java

@@ -0,0 +1,19 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "OaConfigAddParam对象", description = "配置")
+public class OaConfigParam {
+
+    private List<OaConfigAddParam> params;
+}

+ 39 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionAddMarket.java

@@ -0,0 +1,39 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "SystemMarketSectionAddMarket对象", description = "市场")
+public class SystemMarketSectionAddMarket {
+
+    @ApiModelProperty(value = "名称(中文)")
+    private String displayname;
+
+    @ApiModelProperty(value = "Name(英文)")
+    private String displaynameen;
+
+    @ApiModelProperty(value = "Tên(越南语)")
+    private String displaynamevi;
+
+    @ApiModelProperty(value = "Tên(繁体)")
+    private String displaynamezhtw;
+
+    @ApiModelProperty(value = "Tên(泰文)")
+    private String displaynameth;
+
+    private Integer trademode;
+
+    @ApiModelProperty(value = "交易模式")
+    private String marketids;
+
+    @ApiModelProperty(value = "排序")
+    private Integer orderindex;
+}

+ 45 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionAddParam.java

@@ -0,0 +1,45 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "SystemMarketSectionAddParam对象", description = "修改错误码")
+public class SystemMarketSectionAddParam {
+
+    @ApiModelProperty(value = "名称(中文)")
+    private String marketsectionname;
+
+    @ApiModelProperty(value = "Name(英文)")
+    private String marketsectionnameen;
+
+    @ApiModelProperty(value = "Tên(越南语)")
+    private String marketsectionnamevi;
+
+    @ApiModelProperty(value = "Tên(繁体)")
+    private String marketsectionnamezhtw;
+
+    @ApiModelProperty(value = "Tên(泰文)")
+    private String marketsectionnameth;
+
+    @ApiModelProperty(value = "排序")
+    private Integer orderindex;
+
+    @ApiModelProperty(value = "图片(90*90)")
+    private String pictureurl;
+
+    private Long marketsectionid;
+
+    private String remark;
+
+    private List<SystemMarketSectionAddMarket> list;
+}

+ 4 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemMarketSectionParam.java

@@ -16,4 +16,8 @@ public class SystemMarketSectionParam {
     private Long marketsectionid;
 
     private String marketsectionname;
+
+    private Integer pageNum;
+
+    private Integer pageSize;
 }

+ 41 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemPictureDealParam.java

@@ -0,0 +1,41 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "SystemPictureDealParam对象", description = "图片管理")
+public class SystemPictureDealParam {
+
+    private Long configid;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "是否展示")
+    private Integer isshow;
+
+    @ApiModelProperty(value = "链接类型")
+    private Integer urltype;
+
+    @ApiModelProperty(value = "链接")
+    private String url;
+
+    private String url2;
+
+    @ApiModelProperty(value = "广告图")
+    private String imagepath;
+
+    @ApiModelProperty(value = "详情图片")
+    private String imagedetailpath;
+}

+ 33 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/systemsetup/SystemPictureSetParam.java

@@ -0,0 +1,33 @@
+package com.muchinfo.mtp3pojos.vo.systemsetup;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "SystemPictureSetParam对象", description = "图片管理")
+public class SystemPictureSetParam {
+
+    @ApiModelProperty(value = "图片类型  imageConfigType")
+    private Integer imagetype;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "是否展示")
+    private Integer isshow;
+
+    private Long areauserid;
+
+    @ApiModelProperty(value = "* 页码 *")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "* 页大小 *")
+    private Integer pageSize;
+}