Explorar el Código

资金账户报表-->资金账户下拉框查询

xie.kaifeng hace 1 año
padre
commit
0792356352

+ 8 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ReportFormController.java

@@ -66,6 +66,14 @@ public class ReportFormController {
         return iReportFormService.investorReportQuery(param,request);
     }
 
+    @RequestMapping(method = RequestMethod.GET, value = "/queryTAAccountChildrenSelect")
+    @ApiOperation("报表管理-->资金账户报表-->资金账户下拉列表")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    public AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode,Integer usertype, HttpServletRequest request) {
+        return iReportFormService.queryTAAccountChildrenSelect(searchcode,usertype,request);
+    }
+
+
     @RequestMapping(method = RequestMethod.GET, value = "/taaccountReportQuery")
     @ApiOperation("报表管理-->资金账户报表-->资金信息")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)

+ 2 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IReportFormService.java

@@ -30,4 +30,6 @@ public interface IReportFormService {
     PageResult<TradeReportQueryResult> tradequery(TaAccountReportParam param, HttpServletRequest request);
 
     PageResult<ReckonDayaccountpp> accountppquery(TaAccountReportParam param, HttpServletRequest request);
+
+    AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode,Integer usertype, HttpServletRequest request);
 }

+ 8 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ReportFormServiceImpl.java

@@ -346,6 +346,14 @@ public class ReportFormServiceImpl implements IReportFormService {
         return pageResult;
     }
 
+    @Override
+    public AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode, Integer usertype,HttpServletRequest request) {
+        Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+        Long relateduserid = systemmanager.getAreauserid();
+        List<TAAccountChildrenSelect> result = iTaaccountMapper.queryChildren(searchcode,relateduserid,usertype);
+        return null;
+    }
+
     private String formatDate(Integer cycletype, String cycletime, Integer quarter) {
         String rdate = null;
         if (cycletype == 0) {

+ 23 - 0
mtp3-century/src/main/resources/mapper/TaaccountMapper.xml

@@ -266,4 +266,27 @@
             or la.LOGINIDS like '%' || #{searchcode} || '%' )
         </if>
     </select>
+
+    <select id="queryChildren" resultType="com.muchinfo.mtp3pojos.vo.reportform.TAAccountChildrenSelect">
+        select ta.accountid,
+        ua.userid || '/' || ua.accountname relatedname,
+        vlog.LOGINIDS as invloginids,
+        from TAAccount ta
+        inner join useraccount ua on ta.relateduserid = ua.userid
+        left join VIEW_USER_LOGINIDS vlog on vlog.USERID = ua.userid
+        where ta.tradestatus = 1
+        <if test="searchcode != null and searchcode != '' ">
+            and (ua.accountname like '%' || #{searchcode} || '%'
+            or ua.userid like '%' || #{searchcode} || '%'
+            or ta.accountid like '%' || #{searchcode} || '%')
+        </if>
+        <if test="usertype != null and usertype != '' ">
+            and ua.usertype = #{usertype}
+        </if>
+        <if test="relateduserid != null and relateduserid != 1 ">
+            START WITH ua.userid = #{relateduserid}
+            CONNECT BY PRIOR ua.userid = ua.parentuserid
+        </if>
+        order by ua.userid
+    </select>
 </mapper>

+ 3 - 0
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.reportform.RefUserResult;
+import com.muchinfo.mtp3pojos.vo.reportform.TAAccountChildrenSelect;
 import com.muchinfo.mtp3pojos.vo.taaccount.*;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -34,4 +35,6 @@ public interface ITaaccountMapper extends BaseMapper<Taaccount> {
     List<TAAccountChildrenResult> queryTAAccountChildren(@Param("accountName") String accountName,@Param("areaUserId")  Long areaUserId);
 
     List<RefUserResult> queryRefUserSelect(@Param("searchcode")String searchcode,@Param("refereeuserid") Long refereeuserid);
+
+    List<TAAccountChildrenSelect> queryChildren(@Param("searchcode") String searchcode, @Param("relateduserid") Long relateduserid, @Param("usertype") Integer usertype);
 }

+ 21 - 0
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/reportform/TAAccountChildrenSelect.java

@@ -0,0 +1,21 @@
+package com.muchinfo.mtp3pojos.vo.reportform;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiModel(value = "TAAccountChildrenSelect对象", description = "资金账户下拉列表")
+public class TAAccountChildrenSelect {
+
+    private Long accountid;
+
+    private String relatedname;
+
+    private Long invloginids;
+}