Browse Source

发起单独协单修改

anderx 1 year ago
parent
commit
ebc7805335

+ 6 - 5
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -111,17 +111,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (in.getType()==0&&in.getAssist()==4){
 			String[] split = in.getAssistAid().split(",");
 			List<sendListBo> aidList = new ArrayList<>();
-			String userNames=null;
+
 			//每一个协单都是单独的一份
 			for (String s : split) {
 				Admin publicAdmin = adminMapper.selectByPrimaryKey(s);
 				in.setAid(s);
+				in.setType(3);
 				in.setMainName(my.getName());
-				in.setAssistProcess(1);
-				publicReleaseMapper.insertSelective(in);
+				in.setAssistProcess(2);
+				publicReleaseMapper.insert(in);
 				addPRD(in, users, str, prdList);
 				addPublicReleaseDateClock(in);
-				userNames=str.substring(0,str.length()-1);
+				String userNames=str.substring(0,str.length()-1);
 				in.setUserNames(userNames);
 				PublicRelease updateName=new PublicRelease();
 				updateName.setId(in.getId());
@@ -149,7 +150,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			for (sendListBo e : aidList) {
 
 				Admin a = adminMapper.selectByPrimaryKey(e.getAid());
-				sendNoticeAndSoucket(e.getAid(),1, "["+my.getName()+"]发起["+userNames+"]仅技术协单公出申请,请及时审核。");
+				sendNoticeAndSoucket(e.getAid(),1, "["+my.getName()+"]发起["+e.getUserNames()+"]仅技术协单公出申请,请及时审核。");
 				if (a.getOpenId() !=null) {
 					Integer res= weChatUtils.addNotice(a.getOpenId(), in.getStatus(), e.getPrid(), date, my.getName(),"["+ my.getName()+"]发起仅协单申请");
 					if (res!=0) {