Bläddra i källkod

修改非专利发起报官费问题

anderx 4 år sedan
förälder
incheckning
ef691aa68e

+ 20 - 14
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -121,19 +121,21 @@ public class ReleaseUserTask {
 		try {
 			List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
 			List<LockingReleaseBo> lockUserList = new ArrayList<LockingReleaseBo>();
-			List<LockingReleaseBo> userTmpList = null;
-			List<LockingReleaseBo> userTmpList2 = null;
 			if (userList != null && !userList.isEmpty()) {
 				for (User u : userList) {
+					List<LockingReleaseBo> userTmpList = null;
+					List<LockingReleaseBo> userTmpList2 = null;
 					if (StringUtils.isNotBlank(u.getId())) {
 						// 获取30天释放
 						userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
 						// 获取270天释放
-						userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
+						if(!u.getId().equals("734092ad-6564-4021-b7ab-aab5af3a1537")){
+							userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
+							customerService.pushReleaseLog(userTmpList2, 1);
+						}
 						addUserNotice(userTmpList,userTmpList2);
 						//
 						customerService.pushReleaseLog(userTmpList, 0);
-						customerService.pushReleaseLog(userTmpList2, 1);
 						if (userTmpList != null && !userTmpList.isEmpty())
 							lockUserList.addAll(userTmpList);
 						if (userTmpList2 != null && !userTmpList2.isEmpty())
@@ -231,17 +233,21 @@ public class ReleaseUserTask {
 
 	private void addUserNotice(List<LockingReleaseBo> userTmpList, List<LockingReleaseBo> userTmpList2) {
 		List<Notice> nl=new ArrayList<Notice>();
-		for (LockingReleaseBo u : userTmpList) {
-			nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
-					NoticeStatus.CUSTOMER_LOSE30.getCode(), 
-					String.format("您的%s客户【%s】已经30天未跟进,已经自动释放!", "私有", u.getUserName()),
-					u.getUid()));
+		if (!userTmpList.isEmpty()) {
+			for (LockingReleaseBo u : userTmpList) {
+				nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
+						NoticeStatus.CUSTOMER_LOSE30.getCode(), 
+						String.format("您的%s客户【%s】已经30天未跟进,已经自动释放!", "私有", u.getUserName()),
+						u.getUid()));
+			}
 		}
-		for (LockingReleaseBo u : userTmpList2) {
-			nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
-					NoticeStatus.CUSTOMER_LOSE270.getCode(), 
-					String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
-					u.getUid()));
+		if (!userTmpList2.isEmpty()) {
+			for (LockingReleaseBo u : userTmpList2) {
+				nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
+						NoticeStatus.CUSTOMER_LOSE270.getCode(), 
+						String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
+						u.getUid()));
+			}
 		}
 		if(!nl.isEmpty())addNoticeBatch(nl);
 	}

+ 7 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -111,6 +111,7 @@ import com.goafanti.order.bo.TOrderLogBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
+import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.outOrderDunListBo;
 import com.goafanti.order.enums.ActiveState;
 import com.goafanti.order.enums.ApprovalNewState;
@@ -1404,11 +1405,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public boolean checkOfficialType(TOrderOutsource o) {
-		TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(o.getTid());
-		
-		OfficialFeePrice of=officialFeePriceMapper.selectBytype(o.getPatentNameType(), t.getPatentType());
-		if (o.getStartType()==1&&of==null) {
-			return true;
+		TOrderTaskDetailBo t=tOrderTaskMapper.getOrderTaskDetail(o.getTid().toString());
+		if(o.getStartType()==1&&t.getBpType()==1) {
+			OfficialFeePrice of=officialFeePriceMapper.selectBytype(o.getPatentNameType(), t.getPatentType());
+			if (of==null) {
+				return true;
+			}
 		}
 		return false;
 	}

+ 6 - 6
src/main/resources/props/config_local.properties

@@ -2,13 +2,13 @@ dev.name=local
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-jdbc.url=jdbc\:mysql://localhost:3306/aft20210528?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.username=root
-jdbc.password=123456
-•#
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc\:mysql://localhost:3306/aft20210528?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
-#jdbc.password=aftdev
+#jdbc.password=123456
+•#
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
 #\u521d\u59cb\u8fde\u63a5\u6570