Explorar el Código

1、发送邮件BUG修复
2、部门列表新增后未显示BUG修复

anderx hace 4 años
padre
commit
e598534b39

+ 42 - 6
.idea/workspace.xml

@@ -9,11 +9,16 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="客户资料维护修改">
+    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="configpudate">
       <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/dao/UserMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/dao/UserMapper.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/resources/props/config_local.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/props/config_local.properties" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/resources/props/config_test.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/props/config_test.properties" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/utils/AsyncUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/utils/AsyncUtils.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" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java" afterDir="false" />
     </list>
     <list id="571ad643-3e7d-4437-aedf-999fc56d0449" name="updateBusinessScope" comment="" />
     <option name="SHOW_DIALOG" value="false" />
@@ -91,6 +96,19 @@
     </key>
   </component>
   <component name="RunManager">
+    <configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
+      <option name="arquillianRunConfiguration">
+        <value>
+          <option name="containerStateName" value="" />
+        </value>
+      </option>
+      <option name="TEST_OBJECT" value="CLASS" />
+      <properties />
+      <listeners />
+      <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;" />
@@ -224,7 +242,7 @@
       <workItem from="1630656901862" duration="33000" />
       <workItem from="1630888067668" duration="852000" />
       <workItem from="1630893291690" duration="11740000" />
-      <workItem from="1630976664603" duration="3578000" />
+      <workItem from="1630976664603" duration="10505000" />
     </task>
     <task id="LOCAL-00001" summary="修改客户跟进列表">
       <created>1630486551669</created>
@@ -338,12 +356,29 @@
       <option name="project" value="LOCAL" />
       <updated>1630920690177</updated>
     </task>
-    <option name="localTasksCounter" value="17" />
+    <task id="LOCAL-00017" summary="configpudate">
+      <created>1630986282350</created>
+      <option name="number" value="00017" />
+      <option name="presentableId" value="LOCAL-00017" />
+      <option name="project" value="LOCAL" />
+      <updated>1630986282350</updated>
+    </task>
+    <option name="localTasksCounter" value="18" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="3" />
   </component>
+  <component name="Vcs.Log.History.Properties">
+    <option name="COLUMN_ID_ORDER">
+      <list>
+        <option value="Default.Root" />
+        <option value="Default.Author" />
+        <option value="Default.Date" />
+        <option value="Default.Subject" />
+      </list>
+    </option>
+  </component>
   <component name="Vcs.Log.Tabs.Properties">
     <option name="TAB_STATES">
       <map>
@@ -364,7 +399,8 @@
     <MESSAGE value="updateConfig" />
     <MESSAGE value="催款列表修改" />
     <MESSAGE value="客户资料维护修改" />
-    <option name="LAST_COMMIT_MESSAGE" value="客户资料维护修改" />
+    <MESSAGE value="configpudate" />
+    <option name="LAST_COMMIT_MESSAGE" value="configpudate" />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
   </component>
   <component name="XDebuggerManager">

+ 2 - 2
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -269,7 +269,8 @@ public interface UserMapper {
 	 * @param list  用户id列表
 	 */
 	void updateList(@Param("aid")String aid,@Param("level")Integer level, @Param("source")Integer source,
-			@Param("transferTime")Date transferTime,@Param("shareType")Integer shareType,@Param("list")List<String> list);
+			@Param("transferTime")Date transferTime,@Param("shareType")Integer shareType,@Param("list")List<String> list,
+	@Param("data")Integer data);
 
 	int checkUserMax(String aid);
 
@@ -277,7 +278,6 @@ public interface UserMapper {
 
 	void updateShareType(@Param("uid")String uid,@Param("aid")String aid);
 
-	void updateRelease(String orderNo);
 
 	String checkRoleMax(String aid);
 

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

@@ -1634,6 +1634,9 @@
       <if test="aid != null">
       aid = #{aid,jdbcType=VARCHAR},
       </if>
+      <if test="data ==1">
+        information_maintainer = #{aid,jdbcType=VARCHAR},
+      </if>
       <if test="transferTime != null">
       transfer_time = #{transferTime,jdbcType=TIMESTAMP},
       </if>

+ 1 - 1
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -25,7 +25,7 @@ public class AsyncUtils {
 
 	
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
-		
+		SendEmailUtil.getInstance().patentSend(bo);
 	}
 	
 	public void sendList(List<EmailBo> list) {

+ 14 - 8
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -571,7 +571,7 @@ public class AdminCustomerApiController extends BaseApiController{
 			res.getError().add(buildError("","渠道客户丢失后不可再领取"));
 			return res;
 		}
-		customerService.updateByOperatorType(uid, oldAid,AFTConstants.USER_RECEIVE);
+		customerService.updateByOperatorType(uid,null, oldAid,AFTConstants.USER_RECEIVE,null);
 		return res;
 	}
 	
@@ -651,7 +651,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(StringUtils.isBlank(uid) || StringUtils.isBlank("aid")){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, ""));
 		}
-		customerService.updateByOperatorType(uid, aid, AFTConstants.USER_TRANSFER_TO_PUBLIC);
+		customerService.updateByOperatorType(uid, aid,null, AFTConstants.USER_TRANSFER_TO_PUBLIC,null);
 		return res;
 	}
 	
@@ -783,12 +783,18 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(StringUtils.isNotBlank(adminName))res.setData(adminService.listAdminByName(adminName));
 		return res;
 	}
-	
-	/** 
-	 *  客户转交
-	 * 转交客户到制定人 **/
+
+	/**
+	 * 客户转交
+	 * @param uid 用户编号
+	 * @param aid
+	 * @param operatorType 3私有 4签单
+	 * @param oldAid
+	 * @param data 资料同步转移 0否 1是
+	 * @return
+	 */
 	@RequestMapping(value = "/transferToOther", method = RequestMethod.GET)
-	public Result transferToOther(String uid,String aid,Integer operatorType,String oldAid){
+	public Result transferToOther(String uid,String aid,Integer operatorType,Integer data,String oldAid){
 		Result res = new Result();
 		if(StringUtils.isBlank(uid) || StringUtils.isBlank(aid)){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "客户编号或管理员编号"));
@@ -802,7 +808,7 @@ public class AdminCustomerApiController extends BaseApiController{
 			res.getError().add(buildError("","对方私有客户已达最大限制"));
 			return res;
 		}
-		customerService.updateByOperatorType(uid,oldAid,operatorType, aid);
+		customerService.updateByOperatorType(uid,aid,oldAid,operatorType,data);
 		return res;
 	}
 	

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

@@ -242,13 +242,12 @@ public interface CustomerService {
 	 * @param operatorType
 	 * @return
 	 */
-	int updateByOperatorType(String uid,String aid,Integer operatorType,Object... params);
+	int updateByOperatorType(String uid,String aid,String oldAid,Integer operatorType,Integer data);
 	
 	/**
 	 * 客户统计
 	 * @param sDate
 	 * @param eDate
-	 * @param depId
 	 * @return
 	 */
 	Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize);

+ 25 - 22
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -390,7 +390,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			uList = Arrays.asList(uid.split(","));
 		}
 		addUserLock(uid, TokenManager.getAdminId(), now, uList);
-		addUserTransferLog(uid, TokenManager.getAdminId(), 0, null, now, uList);
+		addUserTransferLog(uid, TokenManager.getAdminId(), null,0, null, now, uList);
 		return 1;
 	}
 
@@ -1125,9 +1125,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public int updateByOperatorType(String uid, String oldAid, Integer operatorType, Object... params) {
+	public int updateByOperatorType(String uid,String aid, String oldAid, Integer operatorType,Integer data) {
 		User user = new User();
 		Date now = new Date();
+		if(data==null)data=0;
 		// 是否多个客户
 		boolean isUs = false;
 		if (uid.contains(",")) {
@@ -1139,6 +1140,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		}
 		user.setId(uid);
 		int flag = 0;
+		//领取
 		if (AFTConstants.USER_RECEIVE.equals(operatorType)) {
 			if (userMapper.UserReceiveCount(TokenManager.getAdminId()) >= USER_RECEIVE_MAX)
 				throw new BusinessException(new Error(ErrorConstants.CUSTOM_EREXCESS, "" + USER_RECEIVE_MAX, ""));
@@ -1148,13 +1150,17 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			user.setSource(2);// 客户来源设置为领取
 			user.setTransferTime(now);
 			flag = addUserLock(uid, TokenManager.getAdminId(), now, uList); // 指定用户锁定客户
-			addUserTransferLog(uid, TokenManager.getAdminId(), 1, null, now, uList);
+			addUserTransferLog(uid, TokenManager.getAdminId(), null,1, null, now, uList);
 			if (flag <= 0)
 				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_RECEIVE, ""));
+			//转交
 		} else if (AFTConstants.USER_TRANSFER_TO_OTHER.equals(operatorType)
 				|| AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType) {
 			if (!isUs) {
-				user.setAid(String.valueOf(params[0]));
+				user.setAid(aid);
+				if (data==1){
+					user.setInformationMaintainer(aid);
+				}
 				user.setSource(3);// 客户来源设置为转交
 				if (AFTConstants.USER_TRANSFER_TO_OTHER == operatorType) {
 					// 查询这个客户是否是登陆人的客户
@@ -1163,7 +1169,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 					flag = updateUserLock(uid, oldAid, UserLockReleaseStatus.LOCKED.getCode(),
 							UserLockReleaseStatus.RELEASE.getCode()); // 原用户释放客户
 					if (flag > 0)
-						flag = addUserLock(uid, String.valueOf(params[0]), now, uList); // 指定用户锁定客户
+						flag = addUserLock(uid,aid, now, uList); // 指定用户锁定客户
 					if (flag <= 0)
 						throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL, ""));
 				}
@@ -1177,22 +1183,21 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 					flag = updateUsersLock(uList, oldAid, UserLockReleaseStatus.LOCKED.getCode(),
 							UserLockReleaseStatus.RELEASE.getCode()); // 原用户释放客户
 					if (flag > 0)
-						flag = addUserLock(uid, String.valueOf(params[0]), now, uList); // 指定用户锁定客户
+						flag = addUserLock(uid, aid, now, uList); // 指定用户锁定客户
 					if (flag <= 0)
 						throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL, ""));
 				}
 			}
 			Integer type = 2;
-			if (AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType)
-				type = 7;
+			if (AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType)type = 7;
 
-			addUserTransferLog(uid, String.valueOf(params[0]), type, null, now, uList);
+			addUserTransferLog(uid, aid,oldAid, type, null, now, uList);
 		}
 		if (isUs) {
 			if (AFTConstants.USER_RECEIVE == operatorType) {
-				userMapper.updateList(String.valueOf(params[0]), null, 3, null, 2, uList);
+				userMapper.updateList(aid, null, 3, null, 2, uList,null);
 			} else {
-				userMapper.updateList(String.valueOf(params[0]), null, 3, null, null, uList);
+				userMapper.updateList(aid, null, 3, null, null, uList,data);
 			}
 		} else {
 			userMapper.updateByPrimaryKeySelective(user);
@@ -1239,8 +1244,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	 * 
 	 * @param type 0录入 1 领取 2 转交私有客户 3转交业务 4 未跟进丢失(30) 5未签单丢失(270天)6释放 7转交签单客户
 	 */
-	private void addUserTransferLog(String uid, String aid, Integer type, String pid, Date lockTime,
-			List<String> uList) {
+	private void addUserTransferLog(String uid, String aid,String oldAid, Integer type, String pid,
+			Date lockTime, List<String> uList) {
 		if (uList.isEmpty()) {
 			UserTransferLog utl = new UserTransferLog();
 			if (type == 0 || type == 1)
@@ -1249,8 +1254,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				utl.setAid(TokenManager.getAdminId());
 				utl.setTakeAid(aid);
 			}
-			if (type == 3)
-				utl.setPid(pid);
+			if (type == 3) utl.setPid(pid);
 			utl.setType(type);
 			utl.setCreateTime(lockTime);
 			utl.setUid(uid);
@@ -1261,15 +1265,14 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			for (String string : ulist) {
 				UserTransferLog utl = new UserTransferLog();
 				if (type == 0 || type == 1)
-					utl.setAid(string);
+					utl.setAid(aid);
 				else if (type == 2 || type == 3 || type == 7) {
 					utl.setAid(TokenManager.getAdminId());
-					utl.setTakeAid(string);
+					utl.setTakeAid(aid);
 				}
-				if (type == 3)
-					utl.setPid(pid);
+				if (type == 3) utl.setPid(pid);
 				utl.setCreateTime(lockTime);
-				utl.setUid(uid);
+				utl.setUid(string);
 				utl.setType(type);
 				utlList.add(utl);
 			}
@@ -1852,7 +1855,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			userMapper.updateByPrimaryKeySelective(u);
 		} else {
 			List<String> ulist = Arrays.asList(u.getId().split(","));
-			userMapper.updateList(null, u.getLevel(), null, null, null, ulist);
+			userMapper.updateList(null, u.getLevel(), null, null, null, ulist,null);
 		}
 		return 1;
 	}
@@ -1980,7 +1983,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				ulList.add(utl);
 			}
 			userTransferLogMapper.insertList(ulList);
-			userMapper.updateList(null, null, null, date, 1, list);
+			userMapper.updateList(null, null, null, date, 1, list,null);
 			userLockReleaseMapper.updateUserTypeLockList(list, TokenManager.getAdminId(), 0, 2, date);
 		}
 		return 1;

+ 0 - 7
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -152,13 +152,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	}
 	/**
 	 * 修改订单
-	 * @param orderNo
-	 * @param firstPayment
-	 * @param orderAmount
-	 * @param signFirstPayment
-	 * @param signTotalAmount
-	 * @param approval
-	 * @param orderRemarks
 	 * @return
 	 */
 	@RequestMapping(value = "/updateServiceOrderNew",method = RequestMethod.POST)

+ 1 - 4
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -27,7 +27,6 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
 	
-	List<OrganizationListOut> depList =new ArrayList<OrganizationListOut>();
 	@Override
 	public Pagination<OrganizationListOut> listOrganizationManagement(OrganizationListOut olo, Integer pageNo,
 			Integer pageSize) {
@@ -55,9 +54,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	}
 	@Override
 	public List<OrganizationListOut> selectSuperId(Integer i) {
-		if (depList.isEmpty()) {
-			depList=organizationManagementMapper.selectSuperId(i);
-		}
+		List<OrganizationListOut> depList=organizationManagementMapper.selectSuperId(i);
 		return depList;
 	}
 	/**