Przeglądaj źródła

调整录取通知书编号

shuzhan 10 miesięcy temu
rodzic
commit
ac0385d88a

+ 3 - 3
web/src/main/java/com/jpsoft/campus/modules/base/controller/ApplicationPrimaryController.java

@@ -1742,7 +1742,7 @@ public class ApplicationPrimaryController {
                     }
                 }else if("90".equals(status)){
                     //获取最大编号
-                    int serialNum = offerInfoService.findMaxSerialNum(applicationPrimary.getSchoolId(),"1");
+                    int serialNum = offerInfoService.findMaxSerialNum(applicationPrimary.getOfferId(),"1");
                     serialNum = serialNum+1;//最大编号加一
                     Calendar date = Calendar.getInstance();
                     String year = String.valueOf(date.get(Calendar.YEAR));
@@ -1965,7 +1965,7 @@ public class ApplicationPrimaryController {
                     //微信消息推送 发送完成录取通知
                     applicationPrimary.setStatus(nextStatus);
 
-                    int serialNum = offerInfoService.findMaxSerialNum(applicationPrimary.getSchoolId(), "1");
+                    int serialNum = offerInfoService.findMaxSerialNum(applicationPrimary.getOfferId(), "1");
                     serialNum = serialNum + 1;//最大编号加一
                     Calendar date = Calendar.getInstance();
                     String year = String.valueOf(date.get(Calendar.YEAR));
@@ -1979,7 +1979,7 @@ public class ApplicationPrimaryController {
                     off.setApplicationId(applicationPrimary.getId());
                     off.setStudentId(applicationPrimary.getStudentId());
                     off.setEnrollmentType("1");//小学
-                    off.setSchoolId(applicationPrimary.getSchoolId());
+                    off.setSchoolId(applicationPrimary.getOfferId());
                     off.setSerialNum(serialNum);
                     off.setCode(code);
                     off.setDelFlag(false);

+ 12 - 11
web/src/main/java/com/jpsoft/campus/modules/base/controller/ApportionController.java

@@ -332,16 +332,16 @@ public class ApportionController {
             }
 
             List<Integer> integerList = new ArrayList<>();
-            Random random = new Random();
-            for(int i=0;i<syAmount;i++){
-                for(int j=0;j>-1;j++) {
-                    Integer ran = random.nextInt(applicationPrimaryPage.size());
-                    if (!integerList.contains(ran)) {
-                        integerList.add(ran);
-                        break;
-                    }
-                }
-            }
+//            Random random = new Random();
+//            for(int i=0;i<syAmount;i++){
+//                for(int j=0;j>-1;j++) {
+//                    Integer ran = random.nextInt(applicationPrimaryPage.size());
+//                    if (!integerList.contains(ran)) {
+//                        integerList.add(ran);
+//                        break;
+//                    }
+//                }
+//            }
 
             //写入派位信息
             Apportion apportion = new Apportion();
@@ -397,7 +397,8 @@ public class ApportionController {
                 apportionDetail.setStudentId(applicationPrimary.getStudentId());
                 apportionDetail.setPersonId(applicationPrimary.getPersonId());
                 apportionDetail.setSchoolId(schoolId);
-                Boolean bl = integerList.contains(i) == true ? true : false;
+//                Boolean bl = integerList.contains(i) == true ? true : false;
+                Boolean bl = true;
                 apportionDetail.setWinner(bl);
                 apportionDetail.setDelFlag(false);
                 apportionDetail.setCreateBy(subject);