Преглед изворни кода

1、退学申请通过后清理床位信息
2、住宿变更住转走,通过后清理床位信息

dzx пре 8 месеци
родитељ
комит
2209189f33

+ 6 - 0
src/main/java/com/xjrsoft/module/liteflow/node/StudentDropOutNode.java

@@ -7,6 +7,7 @@ import com.xjrsoft.common.enums.ArchivesStatusEnum;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.StudentChangeTypeEnum;
 import com.xjrsoft.common.enums.WorkflowApproveType;
+import com.xjrsoft.module.room.mapper.RoomBedMapper;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.entity.StudentDropOut;
 import com.xjrsoft.module.student.mapper.StudentDropOutMapper;
@@ -47,6 +48,9 @@ public class StudentDropOutNode extends NodeComponent {
     @Autowired
     private IStudentChangeRecordService changeRecordService;
 
+    @Autowired
+    private RoomBedMapper roomBedMapper;
+
 
     @Override
     public void process() throws Exception {
@@ -96,6 +100,8 @@ public class StudentDropOutNode extends NodeComponent {
                                         .eq(BaseStudentSchoolRoll::getUserId, studentDropOut.getStudentUserId())
                                         .eq(BaseStudentSchoolRoll::getDeleteMark, DeleteMark.NODELETE.getCode())
                         );
+                        //清除床位信息
+                        roomBedMapper.clearBedInfoByStudentUserId(studentDropOut.getStudentUserId(), studentDropOut.getCreateUserId());
                         if(schoolRoll != null){
                             //记录异动
                             changeRecordService.insertData(

+ 7 - 1
src/main/java/com/xjrsoft/module/liteflow/node/WfRoomApplicantNode.java

@@ -10,6 +10,7 @@ import com.xjrsoft.module.hikvision.entity.HikvisionData;
 import com.xjrsoft.module.hikvision.mapper.HikvisionDataMapper;
 import com.xjrsoft.module.hikvision.util.DataUtil;
 import com.xjrsoft.module.room.entity.WfRoomApplicant;
+import com.xjrsoft.module.room.mapper.RoomBedMapper;
 import com.xjrsoft.module.room.service.IWfRoomApplicantService;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
@@ -48,7 +49,8 @@ public class WfRoomApplicantNode extends NodeComponent {
     private WorkflowRecordMapper workflowRecordMapper;
     @Autowired
     private IStudentChangeRecordService changeRecordService;
-
+    @Autowired
+    private RoomBedMapper roomBedMapper;
 
     @Override
     public void process() throws Exception {
@@ -102,6 +104,8 @@ public class WfRoomApplicantNode extends NodeComponent {
                             schoolRoll.setStduyStatus(StudyStatusEnum.InResidence.getCode());
                         } else if (RoomApplicantTypeEnum.ToBeDayPupil.getCode().equals(wfRoomApplicant.getRecedeType())) {
                             schoolRoll.setStduyStatus(StudyStatusEnum.AttendDaySchool.getCode());
+                            //清除床位信息
+                            roomBedMapper.clearBedInfoByStudentUserId(wfRoomApplicant.getApplicantUserId(), wfRoomApplicant.getCreateUserId());
                         }
                         //修改学生班级
                         studentSchoolRollService.updateById(schoolRoll);
@@ -117,6 +121,8 @@ public class WfRoomApplicantNode extends NodeComponent {
                             throw new RuntimeException(e);
                         }
                         //wfRoomApplicantService.noticeParents(formId);
+
+
                     });
                 }
             });