Przeglądaj źródła

客户资料维护修改

anderx 4 lat temu
rodzic
commit
0c0f28e754

+ 29 - 6
.idea/workspace.xml

@@ -9,10 +9,14 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="updateConfig">
+    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="催款列表修改">
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/InputMainProductsList.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/CustomerService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/CustomerService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java" afterDir="false" />
     </list>
     <list id="571ad643-3e7d-4437-aedf-999fc56d0449" name="updateBusinessScope" comment="" />
     <option name="SHOW_DIALOG" value="false" />
@@ -90,6 +94,17 @@
     </key>
   </component>
   <component name="RunManager">
+    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
+      <option name="arquillianRunConfiguration">
+        <value>
+          <option name="containerStateName" value="" />
+        </value>
+      </option>
+      <option name="TEST_OBJECT" value="class" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration name="Tomcat 8.5.59" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 8.5.59" ALTERNATIVE_JRE_ENABLED="false" nameIsGenerated="true">
       <option name="OPEN_IN_BROWSER" value="false" />
       <option name="COMMON_VM_ARGUMENTS" value="-Dprofiles.activation=&quot;local&quot; -Djdbc.worker.id=&quot;1001&quot;" />
@@ -220,7 +235,7 @@
       <workItem from="1630656368650" duration="64000" />
       <workItem from="1630656901862" duration="33000" />
       <workItem from="1630888067668" duration="852000" />
-      <workItem from="1630893291690" duration="5112000" />
+      <workItem from="1630893291690" duration="9569000" />
     </task>
     <task id="LOCAL-00001" summary="修改客户跟进列表">
       <created>1630486551669</created>
@@ -306,7 +321,14 @@
       <option name="project" value="LOCAL" />
       <updated>1630888887921</updated>
     </task>
-    <option name="localTasksCounter" value="13" />
+    <task id="LOCAL-00013" summary="催款列表修改">
+      <created>1630907402214</created>
+      <option name="number" value="00013" />
+      <option name="presentableId" value="LOCAL-00013" />
+      <option name="project" value="LOCAL" />
+      <updated>1630907402214</updated>
+    </task>
+    <option name="localTasksCounter" value="14" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -330,7 +352,8 @@
     <MESSAGE value="1、修改修改客户信息接口" />
     <MESSAGE value="1、修改修改客户信息接口&#10;2、开发客户资料列表&#10;3、开发客户资料日志列表" />
     <MESSAGE value="updateConfig" />
-    <option name="LAST_COMMIT_MESSAGE" value="updateConfig" />
+    <MESSAGE value="催款列表修改" />
+    <option name="LAST_COMMIT_MESSAGE" value="催款列表修改" />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
   </component>
   <component name="XDebuggerManager">

+ 31 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1767,6 +1767,9 @@
   <select id="findMainProductsList" resultType="com.goafanti.customer.bo.OutUserMianProducts">
     select oi.id ,u.id uid, u.nickname userName, oi.business_scope businessScope,
     um.update_name updateName,um.update_aid updateAid,
+     <if test="shiroType ==2">
+     a.name adminName,d.name depName,u.share_type shareType,
+     </if>
     date_format(u.transfer_time ,'%Y-%m-%d %H:%i:%s')transferTimes,
     date_format(um.date_update_time,'%Y-%m-%d %H:%i:%s')dateUpdateTimes
     from `user` u
@@ -1776,10 +1779,24 @@
             and a.task_receiver = #{aid} group by b.buyer_id) t0 on t0.buyer_id = u.id
         </if>
     left join organization_identity oi on u.id = oi.uid left join user_mid um on u.id=um.uid
+    <if test="shiroType==2">
+      left join admin a on u.aid=a.id left join department d on a.department_id =d.id
+    </if>
     where u.share_type in (0, 2, 3) and u.source in(1,2,3)
       <if test="shiroType==1">
       and u.information_maintainer = #{aid}
       </if>
+    <if test="shiroType==2">
+      <if test="adminName !=null">
+      and  a.name like concat('%', #{adminName},'%')
+      </if>
+    <if test="depId !=null">
+      and d.id= #{depId}
+    </if>
+      <if test="shareType !=null">
+        and u.share_type = #{shareType}
+      </if>
+    </if>
       <if test="userName != null">
     and u.nickname like concat('%',#{userName},'%')
       </if>
@@ -1798,10 +1815,24 @@
     and a.task_receiver = #{aid} group by b.buyer_id) t0 on t0.buyer_id = u.id
   </if>
   left join organization_identity oi on u.id = oi.uid
+    <if test="shiroType==2">
+      left join admin a on u.aid=a.id left join department d on a.department_id =d.id
+    </if>
   where u.share_type in (0, 2, 3) and u.source in(1,2,3)
   <if test="shiroType==1">
     and u.information_maintainer = #{aid}
   </if>
+    <if test="shiroType==2">
+      <if test="adminName !=null">
+        and  a.name like concat('%', #{adminName},'%')
+      </if>
+      <if test="depId !=null">
+        and d.id= #{depId}
+      </if>
+      <if test="shareType !=null">
+        and u.share_type = #{shareType}
+      </if>
+    </if>
     <if test="userName != null">
       and u.nickname like concat('%',#{userName},'%')
     </if>

+ 95 - 0
src/main/java/com/goafanti/customer/bo/InputMainProductsList.java

@@ -0,0 +1,95 @@
+package com.goafanti.customer.bo;
+
+public class InputMainProductsList {
+
+    private String userName;
+    private String key;
+    private String startTime;
+    private String endTime;
+    private Integer shiroType;
+    private String adminName;
+    private String depId;
+    private Integer shareType;
+    private Integer pageNo;
+    private Integer pageSize;
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getShiroType() {
+        return shiroType;
+    }
+
+    public void setShiroType(Integer shiroType) {
+        this.shiroType = shiroType;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+}

+ 27 - 0
src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java

@@ -6,10 +6,37 @@ public class OutUserMianProducts {
     private String userName;
     private String businessScope;
     private String updateName;
+    private String adminName;
+    private String depName;
     private String updateAid;
+    private Integer shareType;
     private String transferTimes;
     private String dateUpdateTimes;
 
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
     public String getTransferTimes() {
         return transferTimes;
     }

+ 3 - 17
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -17,6 +17,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.goafanti.customer.bo.*;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -42,17 +43,6 @@ import com.goafanti.common.utils.ExcelUtils;
 import com.goafanti.common.utils.SHA256Util;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.customer.bo.BusinessListBo;
-import com.goafanti.customer.bo.BussinessFollowBo;
-import com.goafanti.customer.bo.CustomerExcelBo;
-import com.goafanti.customer.bo.CustomerListIn;
-import com.goafanti.customer.bo.CustomerListOut;
-import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
-import com.goafanti.customer.bo.CustomerPersonalDetailBo;
-import com.goafanti.customer.bo.FollowBusinessBo;
-import com.goafanti.customer.bo.InputChannelCounts;
-import com.goafanti.customer.bo.InputListChannel;
-import com.goafanti.customer.bo.UserDetailBo;
 import com.goafanti.customer.service.CustomerService;
 import com.goafanti.customer.service.impl.AdminOrgAnnualReportServiceImpl;
 
@@ -1376,17 +1366,13 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/**
 	 * 客户主营产品列表
-	 * @param shiroType 0 营销员 1咨询师
-	 * @param pageNo
-	 * @param pageSize
 	 * @return
 	 */
 	@RequestMapping(value = "/mainProductsList", method = RequestMethod.GET)
-	public Result mainProductsList(String userName,String key,String startTime,String endTime,
-								   Integer shiroType,Integer pageNo,Integer pageSize){
+	public Result mainProductsList(InputMainProductsList in){
 		Result res = new Result();
 
-		res.data(customerService.mainProductsList(userName,key,startTime,endTime,shiroType,pageNo,pageSize));
+		res.data(customerService.mainProductsList(in));
 		return res;
 	}
 

+ 2 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -539,9 +539,10 @@ public interface CustomerService {
 	boolean checkUserName(String userName);
 	Object getUserByNames(String name, Integer pageNo, Integer pageSize);
 
-	Pagination<OutUserMianProducts> mainProductsList(String userName, String key, String startTime, String endTime, Integer shiroType, Integer pageNo, Integer pageSize);
+	Pagination<OutUserMianProducts> mainProductsList(InputMainProductsList in) ;
 
 	List<OutUserDateLogList> userDateLogList(String uid);
 
 	int updateuserBusinessScope(String id, String businessScope);
+
 }

+ 13 - 8
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2246,16 +2246,21 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public Pagination<OutUserMianProducts> mainProductsList(String userName, String key, String startTime, String endTime, Integer shiroType, Integer pageNo, Integer pageSize) {
+	public Pagination<OutUserMianProducts> mainProductsList( InputMainProductsList in) {
 		Map<String,Object> map =new HashMap<>();
 		map.put("aid",TokenManager.getAdminId());
-		if (userName!=null)map.put("userName",userName);
-		if(key!=null)map.put("key",key);
-		if(startTime!=null)map.put("startTime",startTime);
-		if (endTime!=null)map.put("endTime",endTime+" 23:59:59");
-		if (shiroType==null)shiroType=0;
-		map.put("shiroType",shiroType);
-		return (Pagination<OutUserMianProducts>) findPage("findMainProductsList","findMainProductsCount",map,pageNo,pageSize);
+		if(in.getUserName()!=null)map.put("userName",in.getUserName());
+		if(in.getKey()!=null)map.put("key",in.getKey());
+		if(in.getStartTime()!=null)map.put("startTime",in.getStartTime());
+		if(in.getEndTime()!=null)map.put("endTime",in.getEndTime()+" 23:59:59");
+		if(in.getShiroType()==null){in.setShiroType(0);}
+		else if(in.getShiroType()==2){
+			if(in.getAdminName()!=null)map.put("adminName",in.getAdminName());
+			if(in.getDepId()!=null)map.put("depId",in.getDepId());
+			if(in.getShareType()!=null)map.put("shareType",in.getShareType());
+		}
+		map.put("shiroType",in.getShiroType());
+		return (Pagination<OutUserMianProducts>) findPage("findMainProductsList","findMainProductsCount",map,in.getPageNo(),in.getPageSize());
 	}
 
 	@Override