Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 7 months ago
parent
commit
817ff6df57
  1. 6
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java
  2. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java
  3. 2
      hzims-service/operational/src/main/resources/db/2.0.3.sql
  4. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.java
  5. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
  6. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java
  7. 15
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml
  8. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.java
  9. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml
  10. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.java
  11. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.xml
  12. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneZoneMapper.java
  13. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java
  14. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml
  15. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java
  16. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java
  17. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java
  18. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml
  19. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java
  20. 29
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainPlanMapper.java
  21. 48
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainPlanMapper.xml
  22. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java
  23. 16
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml
  24. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java
  25. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java
  26. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java
  27. 11
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestScoreServiceImpl.java
  28. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java
  29. 32
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java
  30. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java
  31. 4
      hzims-service/safeproduct/src/main/resources/db/2.0.1.sql
  32. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java
  33. 44
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

6
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java

@ -7,6 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
@ -20,6 +21,11 @@ import java.util.Date;
@ApiModel(value = "特种设备实体类")
public class SpecialDeviceEntity extends BaseEntity {
@NotNull
@Size(max = 50, message = "设备所属机构字段长度不能超过50")
@ApiModelProperty("设备所属机构")
private String unit;
@Size(max = 50, message = "设备名称长度不能超过50")
@ApiModelProperty("设备名称")
private String name;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java

@ -28,7 +28,9 @@ public interface TaskMapper extends UserDataScopeBaseMapper<TaskEntity> {
*/
List<TaskVo> getListPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task);
@UserDataAuth
List<TaskVo> getAllPageList(@Param("page") IPage<TaskVo> page, @Param("task") TaskDTO taskDTO);
List<TaskVo> getAllExportList(@Param("task") TaskDTO taskDTO);
List<TaskVo> mainQueryPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task);

2
hzims-service/operational/src/main/resources/db/2.0.3.sql

@ -22,7 +22,7 @@ update hzims_oper_maintenance_plan t1,(
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护任务设备名称
update hzims_oper_maintenance_task t1,(
select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,prod_hzims_equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE`
select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE`
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护计划周期字段值
update `hzims_oper_maintenance_plan` mp,`hzims_oper_maintenance_library` ml

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.java

@ -1,9 +1,10 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.dto.ConferenceExportDTO;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
@ -14,7 +15,7 @@ import java.util.List;
* @date 2023-12-27
*/
@Mapper
public interface ConferencePlanMapper extends BaseMapper<ConferencePlanEntity> {
public interface ConferencePlanMapper extends UserDataScopeBaseMapper<ConferencePlanEntity> {
/**
* 根据单位和计划时间查询会议记录
@ -23,5 +24,6 @@ public interface ConferencePlanMapper extends BaseMapper<ConferencePlanEntity> {
* @param endTime 计划结束时间
* @return 会议记录列表
*/
@UserDataAuth
List<ConferenceExportDTO> getConferenceByUnitAndDate(String unit, String startTime, String endTime);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml

@ -3,7 +3,8 @@
<select id="getConferenceByUnitAndDate" resultType="com.hnac.hzims.safeproduct.dto.ConferenceExportDTO">
SELECT
unit, scheduled_start_time, scheduled_end_time, theme, location, conference_method, host, conference_status
unit, scheduled_start_time, scheduled_end_time, theme, location, conference_method, host, conference_status,
create_user, create_dept
FROM
hzims_conference_plan
WHERE

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java

@ -1,12 +1,14 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
/**
@ -16,7 +18,7 @@ import java.util.Map;
* @date 2023-12-27
*/
@Mapper
public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> {
public interface ConferenceRecordMapper extends UserDataScopeBaseMapper<ConferenceRecordEntity> {
/**
* 查询会议记录表详情
@ -31,5 +33,13 @@ public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntit
* @param param 参数
* @return 会议记录分页
*/
@UserDataAuth
IPage<ConferenceRecordVO> getConferenceRecordPage(IPage<ConferenceRecordVO> page, Map<String, Object> param);
/**
* 查询当月会议记录
* @param month 当月
* @return 当月会议数据表
*/
List<ConferenceRecordEntity> selectConferenceByMonth(String month);
}

15
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml

@ -17,7 +17,8 @@
<select id="getConferenceRecordPage" resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordVO">
SELECT
t1.id, t1.code, t2.unit, t2.scheduled_start_time, t2.scheduled_end_time, t1.actual_start_time, t1.actual_end_time,
t2.location, t2.host, t2.conference_method, t2.theme, t2.conference_status, t1.recorder, t1.content
t2.location, t2.host, t2.conference_method, t2.theme, t2.conference_status, t1.recorder, t1.content, t1.create_user,
t1.create_dept
FROM
hzims_conference_record t1
LEFT JOIN hzims_conference_plan t2 ON t1.conference_plan_id = t2.id
@ -38,4 +39,16 @@
ORDER BY
t1.create_time DESC
</select>
<select id="selectConferenceByMonth" resultType="com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity">
SELECT
*
FROM
hzims_conference_record
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.java

@ -1,10 +1,11 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
import com.hnac.hzims.safeproduct.vo.HygieneMonthVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
@ -14,7 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2023-12-27
*/
@Mapper
public interface HygienePlanMapper extends BaseMapper<HygienePlanEntity> {
public interface HygienePlanMapper extends UserDataScopeBaseMapper<HygienePlanEntity> {
/**
* 查询当月各单位的卫生自查总数
@ -23,6 +24,7 @@ public interface HygienePlanMapper extends BaseMapper<HygienePlanEntity> {
* @param month 月份
* @return 当月的卫生自查总数据
*/
@UserDataAuth
IPage<HygieneMonthVO> selectByMonth(IPage<HygieneMonthVO> page, String unit, String month);
/**
@ -32,5 +34,6 @@ public interface HygienePlanMapper extends BaseMapper<HygienePlanEntity> {
* @param month 月份
* @return 当月的已完成数据
*/
@UserDataAuth
IPage<HygieneMonthVO> selectFinishedDataByMonth(IPage<HygieneMonthVO> page, String unit, String month);
}

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml

@ -3,7 +3,7 @@
<select id="selectByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO">
SELECT
unit, count(1) as scheduled_check_num
unit, count(1) as scheduled_check_num, create_user, create_dept
FROM
hzims_hygiene_plan
WHERE
@ -20,7 +20,7 @@
<select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO">
SELECT
unit, count(1) as finished_check_num
unit, count(1) as finished_check_num, create_user, create_dept
FROM
hzims_hygiene_plan
WHERE

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.java

@ -1,12 +1,14 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity;
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
/**
@ -16,7 +18,7 @@ import java.util.Map;
* @date 2023-12-27
*/
@Mapper
public interface HygieneRecordMapper extends BaseMapper<HygieneRecordEntity> {
public interface HygieneRecordMapper extends UserDataScopeBaseMapper<HygieneRecordEntity> {
/**
* 查询卫生自查记录详情
@ -31,5 +33,13 @@ public interface HygieneRecordMapper extends BaseMapper<HygieneRecordEntity> {
* @param page 分页类
* @return 记录数据页
*/
@UserDataAuth
IPage<HygieneRecordPageVO> recordPage(IPage<HygieneRecordPageVO> page, Map<String, Object> param);
/**
* 查询当月卫生自查记录
* @param month 当月
* @return 当月卫生自查数据表
*/
List<HygieneRecordEntity> selectHygieneByMonth(String month);
}

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.xml

@ -14,7 +14,7 @@
<select id="recordPage" resultType="com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO">
SELECT
id, unit, actual_start_time, actual_end_time, check_user, week_num, hygiene_plan_id
id, unit, actual_start_time, actual_end_time, check_user, week_num, hygiene_plan_id, create_user, create_dept
FROM
hzims_hygiene_record
WHERE
@ -34,4 +34,16 @@
ORDER BY
create_time DESC
</select>
<select id="selectHygieneByMonth" resultType="com.hnac.hzims.safeproduct.entity.HygieneRecordEntity">
SELECT
*
FROM
hzims_hygiene_record
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneZoneMapper.java

@ -1,8 +1,8 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* 卫生自查责任区Mapper类
@ -11,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2024-01-02
*/
@Mapper
public interface HygieneZoneMapper extends BaseMapper<HygieneZoneEntity> {
public interface HygieneZoneMapper extends UserDataScopeBaseMapper<HygieneZoneEntity> {
}

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java

@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
/**
@ -34,4 +35,11 @@ public interface RehearsalRecordMapper extends UserDataScopeBaseMapper<Rehearsal
*/
@UserDataAuth
IPage<RehearsalRecordlVO> getRehearsalRecordPage(IPage<RehearsalRecordlVO> page, Map<String, Object> param);
/**
* 查询当月演练记录
* @param month 当月
* @return 当月演练数据表
*/
List<RehearsalRecordEntity> selectRehearsalByMonth(String month);
}

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml

@ -39,4 +39,16 @@
ORDER BY
t1.create_time DESC
</select>
<select id="selectRehearsalByMonth" resultType="com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity">
SELECT
*
FROM
hzims_rehearsal_record
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java

@ -1,9 +1,10 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
@ -15,7 +16,7 @@ import java.util.Map;
* @date 2024-01-22
*/
@Mapper
public interface SpecialDeviceInspectionMapper extends BaseMapper<SpecialDeviceInspectionEntity> {
public interface SpecialDeviceInspectionMapper extends UserDataScopeBaseMapper<SpecialDeviceInspectionEntity> {
/**
* 设备检验记录分页
@ -23,6 +24,7 @@ public interface SpecialDeviceInspectionMapper extends BaseMapper<SpecialDeviceI
* @param page 分页类
* @return 设备检验记录数据
*/
@UserDataAuth
IPage<SpecialDeviceInspectionEntity> getInspectionPage(IPage<SpecialDeviceInspectionEntity> page, Map<String, Object> param);
/**

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java

@ -1,8 +1,8 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* 特种设备Mapper类
@ -11,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2024-01-12
*/
@Mapper
public interface SpecialDeviceMapper extends BaseMapper<SpecialDeviceEntity> {
public interface SpecialDeviceMapper extends UserDataScopeBaseMapper<SpecialDeviceEntity> {
}

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java

@ -1,10 +1,11 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.dto.TestDTO;
import com.hnac.hzims.safeproduct.entity.TestEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
@ -16,13 +17,14 @@ import java.util.Map;
* @date 2023-12-25
*/
@Mapper
public interface TestMapper extends BaseMapper<TestEntity> {
public interface TestMapper extends UserDataScopeBaseMapper<TestEntity> {
/**
* 查询考试记录名称列表
* @param trainPlanId 培训计划id
* @return 考试记录名称列表
*/
@UserDataAuth
List<TestDTO> getTestNameList(String trainPlanId);
/**
@ -31,5 +33,13 @@ public interface TestMapper extends BaseMapper<TestEntity> {
* @param page 分页类
* @return 考试记录数据
*/
@UserDataAuth
IPage<TestEntity> testPage(IPage<TestEntity> page, Map<String, Object> param);
/**
* 查询当月考试记录
* @param month 当月
* @return 当月考试记录
*/
List<TestEntity> selectTestByMonth(String month);
}

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml

@ -4,7 +4,7 @@
<select id="getTestNameList" resultType="com.hnac.hzims.safeproduct.dto.TestDTO">
SELECT
id, test_name
id, test_name, create_user, create_dept
FROM
hzims_test
WHERE
@ -38,4 +38,16 @@
ORDER BY
create_time DESC
</select>
<select id="selectTestByMonth" resultType="com.hnac.hzims.safeproduct.entity.TestEntity">
SELECT
*
FROM
hzims_test
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java

@ -1,9 +1,9 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.TestScoreEntity;
import com.hnac.hzims.safeproduct.vo.TestScoreVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
@ -14,7 +14,7 @@ import java.util.List;
* @date 2023-12-25
*/
@Mapper
public interface TestScoreMapper extends BaseMapper<TestScoreEntity> {
public interface TestScoreMapper extends UserDataScopeBaseMapper<TestScoreEntity> {
/**
* 查询考试成绩列表

29
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainPlanMapper.java

@ -1,14 +1,16 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO;
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity;
import com.hnac.hzims.safeproduct.vo.TrainMonthVO;
import com.hnac.hzims.safeproduct.vo.TrainYearVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
/**
* 培训计划Mapper类
@ -17,7 +19,7 @@ import java.util.List;
* @date 2023-12-25
*/
@Mapper
public interface TrainPlanMapper extends BaseMapper<TrainPlanEntity> {
public interface TrainPlanMapper extends UserDataScopeBaseMapper<TrainPlanEntity> {
/**
* 查询当月各单位的培训计划总数
@ -26,6 +28,7 @@ public interface TrainPlanMapper extends BaseMapper<TrainPlanEntity> {
* @param month 月份
* @return 当月培训计划总数
*/
@UserDataAuth
IPage<TrainMonthVO> selectByMonth(IPage<TrainMonthVO> page, String unit, String month);
/**
@ -35,6 +38,7 @@ public interface TrainPlanMapper extends BaseMapper<TrainPlanEntity> {
* @param month 月份
* @return 当月已完成培训计划数
*/
@UserDataAuth
IPage<TrainMonthVO> selectFinishedDataByMonth(IPage<TrainMonthVO> page1, String unit, String month);
/**
@ -44,6 +48,7 @@ public interface TrainPlanMapper extends BaseMapper<TrainPlanEntity> {
* @param year 年份
* @return 年度单位数据
*/
@UserDataAuth
IPage<TrainYearVO> selectUnitByYear(IPage<TrainYearVO> page, String unit, String year);
/**
@ -52,5 +57,25 @@ public interface TrainPlanMapper extends BaseMapper<TrainPlanEntity> {
* @param year 年份
* @return 单位各月的培训计划数
*/
@UserDataAuth
List<AnalysisYearDTO> selectFinishedDataByUnit(List<String> unitList, String year);
/**
* 培训计划分页
* @param param 入参
* @param page 分页类
* @return 培训计划数据
*/
@UserDataAuth
IPage<TrainPlanEntity> trainPlanPage(IPage<TrainPlanEntity> page, Map<String, Object> param);
/**
* 根据单位和计划时间查询培训计划数据
* @param unit 单位
* @param startTime 计划开始时间
* @param endTime 计划结束时间
* @return 培训计划列表
*/
@UserDataAuth
List<TrainPlanEntity> selectListByUnitAndDate(String unit, String startTime, String endTime);
}

48
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainPlanMapper.xml

@ -4,7 +4,7 @@
<select id="selectByMonth" resultType="com.hnac.hzims.safeproduct.vo.TrainMonthVO">
SELECT
unit, count(1) as scheduled_train_num
unit, count(1) as scheduled_train_num, create_user, create_dept
FROM
hzims_train_plan
WHERE
@ -21,7 +21,7 @@
<select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.TrainMonthVO">
SELECT
unit, count(1) as finished_train_num
unit, count(1) as finished_train_num, create_user, create_dept
FROM
hzims_train_plan
WHERE
@ -39,7 +39,7 @@
<select id="selectUnitByYear" resultType="com.hnac.hzims.safeproduct.vo.TrainYearVO">
SELECT
distinct unit
distinct unit, create_user, create_dept
FROM
hzims_train_plan
WHERE
@ -54,7 +54,7 @@
<select id="selectFinishedDataByUnit" resultType="com.hnac.hzims.safeproduct.dto.AnalysisYearDTO">
SELECT
unit, DATE_FORMAT(scheduled_end_time, '%m') as dateTime, count(1) as finished_num
unit, DATE_FORMAT(scheduled_end_time, '%m') as dateTime, count(1) as finished_num, create_user, create_dept
FROM
hzims_train_plan
WHERE
@ -70,4 +70,44 @@
ORDER BY
unit
</select>
<select id="trainPlanPage" resultType="com.hnac.hzims.safeproduct.entity.TrainPlanEntity">
SELECT
*
FROM
hzims_train_plan
WHERE
is_deleted = 0
<if test="param.unit != null and param.unit != ''">
AND unit like concat('%', #{param.unit}, '%')
</if>
<if test="param.startTime != null and param.startTime != ''">
AND scheduled_start_time >= #{param.startTime}
</if>
<if test="param.endTime != null and param.endTime != ''">
AND scheduled_end_time &lt;= #{param.endTime}
</if>
ORDER BY
create_time DESC
</select>
<select id="selectListByUnitAndDate" resultType="com.hnac.hzims.safeproduct.entity.TrainPlanEntity">
SELECT
*
FROM
hzims_train_plan
WHERE
is_deleted = 0
<if test="unit != 'null' and unit != ''">
AND unit like concat('%', #{unit}, '%')
</if>
<if test="startTime != 'null' and startTime != ''">
AND scheduled_start_time >= #{startTime}
</if>
<if test="endTime != 'null' and endTime != ''">
AND scheduled_end_time &lt;= #{endTime}
</if>
ORDER BY
create_time DESC
</select>
</mapper>

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java

@ -1,12 +1,13 @@
package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity;
import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.TrainRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
import java.util.Map;
@ -18,13 +19,14 @@ import java.util.Map;
* @date 2023-12-25
*/
@Mapper
public interface TrainRecordMapper extends BaseMapper<TrainRecordEntity> {
public interface TrainRecordMapper extends UserDataScopeBaseMapper<TrainRecordEntity> {
/**
* 查询培训记录名称列表
* @param trainPlanId 培训计划id
* @return 培训记录名称列表
*/
@UserDataAuth
List<TrainRecordDTO> getTrainRecordNameList(String trainPlanId);
/**
@ -40,5 +42,13 @@ public interface TrainRecordMapper extends BaseMapper<TrainRecordEntity> {
* @param page 分页类
* @return 培训记录数据
*/
@UserDataAuth
IPage<TrainRecordVO> trainRecordPage(IPage<TrainRecordVO> page, Map<String, Object> param);
/**
* 查询当月培训记录
* @param month 当月
* @return 当月培训记录
*/
List<TrainRecordEntity> selectTrainByMonth(String month);
}

16
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml

@ -4,7 +4,7 @@
<select id="getTrainRecordNameList" resultType="com.hnac.hzims.safeproduct.dto.TrainRecordDTO">
SELECT
id, train_record_name
id, train_record_name, create_user, create_dept
FROM
hzims_train_record
WHERE
@ -32,7 +32,7 @@
SELECT
t1.id, t2.scheduled_start_time, t2.scheduled_end_time, t2.unit, t1.train_record_name, t2.location, t2.train_method,
t2.teacher, t2.lesson, t1.actual_start_time, t1.actual_end_time, t2.is_test, t2.train_status, t1.code, t1.content,
t1.command
t1.command, t1.create_user, t1.create_dept
FROM
hzims_train_record t1
LEFT JOIN hzims_train_plan t2 ON t1.train_plan_id = t2.id
@ -53,4 +53,16 @@
ORDER BY
t1.create_time DESC
</select>
<select id="selectTrainByMonth" resultType="com.hnac.hzims.safeproduct.entity.TrainRecordEntity">
SELECT
*
FROM
hzims_train_record
WHERE
is_deleted = 0
AND create_time like concat(#{month}, '%')
ORDER BY
code DESC
</select>
</mapper>

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

@ -178,9 +178,6 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
* @return 当月会议数据表
*/
public List<ConferenceRecordEntity> getConferenceByMonth(String month) {
QueryWrapper<ConferenceRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(ConferenceRecordEntity::getCreateTime, month)
.orderByDesc(ConferenceRecordEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectConferenceByMonth(month);
}
}

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java

@ -218,10 +218,7 @@ public class HygieneRecordServiceImpl extends ServiceImpl<HygieneRecordMapper, H
* @return 当月卫生自查数据表
*/
private List<HygieneRecordEntity> getHygieneByMonth(String month) {
QueryWrapper<HygieneRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(HygieneRecordEntity::getCreateTime, month)
.orderByDesc(HygieneRecordEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectHygieneByMonth(month);
}
/**

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java

@ -23,7 +23,6 @@ import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -116,10 +115,7 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
* @return 当月演练数据表
*/
public List<RehearsalRecordEntity> getRehearsalByMonth(String month) {
QueryWrapper<RehearsalRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(RehearsalRecordEntity::getCreateTime, month)
.orderByDesc(RehearsalRecordEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectRehearsalByMonth(month);
}
/**

11
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestScoreServiceImpl.java

@ -11,8 +11,6 @@ import com.hnac.hzims.safeproduct.mapper.TestScoreMapper;
import com.hnac.hzims.safeproduct.service.ITestScoreService;
import com.hnac.hzims.safeproduct.vo.TestScoreSumVO;
import com.hnac.hzims.safeproduct.vo.TestScoreVO;
import com.hnac.hzinfo.inspect.ai.entity.RobotTaskEntity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
@ -22,8 +20,8 @@ import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -41,11 +39,12 @@ import java.util.stream.Collectors;
* @date 2023-12-25
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class TestScoreServiceImpl extends ServiceImpl<TestScoreMapper, TestScoreEntity> implements ITestScoreService {
private final ISysClient sysClient;
private final IUserClient userClient;
@Autowired
ISysClient sysClient;
@Resource
TestMapper testMapper;

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java

@ -18,7 +18,6 @@ import com.hnac.hzims.safeproduct.service.ITestScoreService;
import com.hnac.hzims.safeproduct.service.ITestService;
import com.hnac.hzims.safeproduct.utils.BaseUtil;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@ -247,9 +246,6 @@ public class TestServiceImpl extends ServiceImpl<TestMapper, TestEntity> impleme
* @return 当月考试记录
*/
public List<TestEntity> getTestByMonth(String month) {
QueryWrapper<TestEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(TestEntity::getCreateTime, month)
.orderByDesc(TestEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectTestByMonth(month);
}
}

32
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java

@ -5,12 +5,10 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO;
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity;
@ -265,21 +263,8 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
*/
@Override
public IPage<TrainPlanEntity> trainPlanPage(Map<String, Object> param, Query query) {
QueryWrapper<TrainPlanEntity> queryWrapper = new QueryWrapper<>();
String unit = String.valueOf(param.get("unit"));
String startTime = String.valueOf(param.get("scheduledStartTime"));
String endTime = String.valueOf((param.get("scheduledEndTime")));
if (!unit.equals("null") && !unit.equals("")) {
queryWrapper.lambda().like(TrainPlanEntity::getUnit, unit);
}
if (!startTime.equals("null") && !startTime.equals("")) {
queryWrapper.lambda().ge(TrainPlanEntity::getScheduledStartTime, startTime);
}
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(TrainPlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(TrainPlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
IPage<TrainPlanEntity> page = new Page<>(query.getCurrent(), query.getSize());
return baseMapper.trainPlanPage(page, param);
}
/**
@ -290,17 +275,6 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
* @return 培训计划列表
*/
public List<TrainPlanEntity> getTrainPlanByUnitAndDate(String unit, String startTime, String endTime) {
LambdaQueryWrapper<TrainPlanEntity> queryWrapper = new LambdaQueryWrapper<>();
if (!unit.equals("null")) {
queryWrapper.eq(TrainPlanEntity::getUnit, unit);
}
if (!startTime.equals("null")) {
queryWrapper.ge(TrainPlanEntity::getScheduledStartTime, startTime);
}
if (!endTime.equals("null")) {
queryWrapper.lt(TrainPlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.orderByDesc(TrainPlanEntity::getCreateTime);
return this.list(queryWrapper);
return baseMapper.selectListByUnitAndDate(unit, startTime, endTime);
}
}

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java

@ -219,9 +219,6 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
* @return 当月培训记录
*/
public List<TrainRecordEntity> getTrainByMonth(String month) {
QueryWrapper<TrainRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(TrainRecordEntity::getCreateTime, month)
.orderByDesc(TrainRecordEntity::getCode);
return this.list(queryWrapper);
return baseMapper.selectTrainByMonth(month);
}
}

4
hzims-service/safeproduct/src/main/resources/db/2.0.1.sql

@ -7,3 +7,7 @@ ALTER TABLE hzims_conference_plan
ALTER TABLE hzims_rehearsal_plan
MODIFY COLUMN scheduled_start_time datetime NOT NULL COMMENT '演练计划开始时间',
MODIFY COLUMN scheduled_end_time datetime NOT NULL COMMENT '演练计划结束时间';
-- 特种设备表:添加单位字段
ALTER TABLE hzims_device
ADD COLUMN unit varchar(50) NOT NULL COMMENT '单位';

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -373,7 +373,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
params.put("isStart",workTicketInfoEntity.getIsStart() ? "☑" : "□");
// 许可人许可环节
if(ObjectUtil.isNotEmpty(workTicketInfoEntity.getLicenseTime())) {
params.put("licensorName",Optional.ofNullable(workTicketInfoEntity.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null));
String licensorName = StringUtil.isNotBlank(workTicketInfoEntity.getLicensorName()) && Func.isNotEmpty(workTicketInfoEntity.getLicensorName()) ?
workTicketInfoEntity.getLicensorName() : Optional.ofNullable(workTicketInfoEntity.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null);
params.put("licensorName",licensorName);
params.put("principalName1",params.get("principalName"));
}
WorkTicketFinish finish = workTicketFinishService.selectByTicketId(ticketId);

44
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -50,9 +50,7 @@ import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.*;
import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.feign.ISysClient;
@ -529,7 +527,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
return true;
}
workTicket.setProcessInstanceId(response.getProcessInstanceId());
this.saveWorkTicket(workTicket,response);
this.fillCurrentFlowName(workTicket,response);
firstWorkTicketService.updateById(workTicket);
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
if(CollectionUtil.isNotEmpty(safetyMeasuresList)) {
@ -643,7 +641,43 @@ public class TicketProcessServiceImpl implements TicketProcessService {
}
}
/**
* 填充工作票当前流程环节名称
* @param workTicket 工作票
* @param response redis订阅消息
* @return 当前流程环节名称
*/
private void fillCurrentFlowName(WorkTicketInfoEntity workTicket, ProcessWorkFlowResponse response) {
String taskId = response.getTaskId();
Object variablesObj = response.getVariables();
JSONObject variable = JSONObject.parseObject(JSON.toJSONString(variablesObj));
Boolean signFlag = Func.isNotEmpty(variable.getBoolean("signFlag")) ? variable.getBoolean("signFlag") : true;
Boolean receiveFlag = Func.isNotEmpty(variable.getBoolean("recieveFlag")) ? variable.getBoolean("recieveFlag") : true;
if(StringUtil.isNotBlank(taskId)) {
workTicket.setFlowUserId(response.getUserId());
workTicket.setNextStepOperator(response.getNextStepOperator());
String flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批");
workTicket.setFlowDescription(flowDescription);
workTicket.setFlowTaskId(taskId);
workTicket.setFlowTaskName(response.getTaskName());
}
else if(!signFlag || !receiveFlag ) {
// 作废
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setNextStepOperator(null);
workTicket.setStepOperator(null);
}
else {
// 结束
workTicket.setFlowDescription("结束");
workTicket.setFlowTaskName("结束");
workTicket.setNextStepOperator(null);
workTicket.setStepOperator(null);
workTicket.setFlowStatus(999);
workTicket.setImplementStatus("3");
}
}
/**
* 获取描述信息
*

Loading…
Cancel
Save