Browse Source

1、学生处分查询调整
2、数据面板调整

dzx 1 year ago
parent
commit
dd83d0236b

+ 11 - 3
src/main/java/com/xjrsoft/module/databoard/controller/DatadetailController.java

@@ -34,11 +34,13 @@ import com.xjrsoft.module.student.service.IBaseStudentService;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import com.xjrsoft.module.teacher.entity.BaseTeacher;
+import com.xjrsoft.module.teacher.entity.WfHeadTeacherLeave;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import com.xjrsoft.module.teacher.service.ITeacherbaseManagerService;
 import com.xjrsoft.module.teacher.vo.XjrUserPageVo;
 import com.xjrsoft.module.workflow.constant.WorkflowConstant;
 import com.xjrsoft.module.workflow.entity.WorkflowExtra;
+import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
 import com.xjrsoft.module.workflow.entity.WorkflowSchema;
 import com.xjrsoft.module.workflow.service.IWorkflowExtraService;
 import com.xjrsoft.module.workflow.utils.WorkFlowUtil;
@@ -576,7 +578,11 @@ public class DatadetailController {
             endTime = dto.getEndDate().atStartOfDay().plusDays(1).plusNanos(-1);
         }
         List<WfSubscription> list = subscriptionService.list(
-                new QueryWrapper<WfSubscription>().lambda()
+                new MPJLambdaWrapper<WfSubscription>()
+                        .select(WfSubscription::getId)
+                        .select(WfSubscription.class, x -> VoToColumnUtil.fieldsToColumns(WfSubscription.class).contains(x.getProperty()))
+                        .innerJoin(WorkflowFormRelation.class, WorkflowFormRelation::getFormKeyValue, WfSubscription::getId)
+                        .eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
                         .between((startTime != null && endTime != null), WfSubscription::getShenQingRiQi4752, startTime, endTime)
         );
 
@@ -593,9 +599,10 @@ public class DatadetailController {
 
         String sql = "SELECT IFNULL(t3.name, '未填写') AS item,COUNT(t1.id) AS a_count,SUM(t1.estimated_unit_price * t1.amount) as a_sum FROM wf_subscription_list t1" +
                 " INNER JOIN wf_subscription t2 ON t1.parent_id = t2.id" +
+                " INNER JOIN xjr_workflow_form_relation t4 ON t1.id = t4.form_key_value" +
                 " LEFT JOIN xjr_dictionary_detail t3 ON t1.item_type = t3.code" +
                 " AND t3.item_id = 1752140413593518081" +
-                " WHERE t2.status = 1";
+                " WHERE t4.current_state = 'COMPLETED'";
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         if(startTime != null && endTime != null){
             sql += " and t2.shen_qing_ri_qi4752 between '" + startTime.format(formatter) + "' and '" + endTime.format(formatter) + "'";
@@ -624,8 +631,9 @@ public class DatadetailController {
 
         sql = "SELECT IFNULL(t3.name, '未填写') AS item,COUNT(t1.id) AS a_count,SUM(t1.estimated_unit_price * t1.amount) as a_sum FROM wf_subscription_list t1" +
             " INNER JOIN wf_subscription t2 ON t1.parent_id = t2.id" +
+            " INNER JOIN xjr_workflow_form_relation t4 ON t1.id = t4.form_key_value" +
             " LEFT JOIN xjr_department t3 ON t2.application_department = t3.id" +
-            " WHERE t2.status = 1";
+            " WHERE t4.current_state = 'COMPLETED'";
         if(startTime != null && endTime != null){
             sql += " and t2.shen_qing_ri_qi4752 between '" + startTime.format(formatter) + "' and '" + endTime.format(formatter) + "'";
         }

+ 2 - 5
src/main/resources/mapper/student/BaseStudentPunishmentInfoMapper.xml

@@ -46,11 +46,8 @@
         <if test="dto.punishmentTypeId != null and dto.punishmentTypeId > 0">
             and t.punishment_type_id = #{dto.punishmentTypeId}
         </if>
-        <if test="dto.startTime != null and dto.startTime != ''">
-            and t.start_time = #{dto.startTime}
-        </if>
-        <if test="dto.endTime != null and dto.endTime != ''">
-            and t.end_time = #{dto.endTime}
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t1.start_time between date_format(#{dto.startDate}, '%Y-%m-%d') and date_format(#{dto.endDate}, '%Y-%m-%d')
         </if>
         <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
             and t5.credential_number = #{dto.credentialNumber}