Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 9 months ago
parent
commit
fae965982f
  1. 29
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/DutyClassTypeTree.java
  2. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java
  3. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java
  4. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java
  5. 42
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml
  6. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java
  7. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java
  8. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java
  9. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SystemFileServiceImpl.java
  10. 19
      hzims-service/safeproduct/src/main/resources/file/体系文件审批.bpmn20.xml

29
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/DutyClassTypeTree.java

@ -0,0 +1,29 @@
package com.hnac.hzims.operational.duty.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.hnac.hzims.common.pojo.Tree;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "机构-值班班次类型-班次树",description = "机构-值班班次类型-班次树")
public class DutyClassTypeTree implements Tree<DutyClassTypeTree> {
@ApiModelProperty("树ID")
private Long id;
@ApiModelProperty("父节点树ID")
@JsonIgnore
private Long parentId;
@ApiModelProperty("节点名称")
private String name;
@ApiModelProperty("子节点")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DutyClassTypeTree> children;
}

3
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java

@ -50,4 +50,7 @@ public class SystemFileEntity extends TenantEntity {
@ApiModelProperty(value = "工作流ID") @ApiModelProperty(value = "工作流ID")
private String flowId; private String flowId;
@ApiModelProperty("创建人")
private Long createUser;
} }

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java

@ -6,12 +6,15 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.common.pojo.Tree;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyClassService; import com.hnac.hzims.operational.duty.service.IImsDutyClassService;
import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Value;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -139,7 +142,12 @@ public class ImsDutyClassController extends BladeController {
return imsDutyClassService.typeRemove(classTypeId); return imsDutyClassService.typeRemove(classTypeId);
} }
@GetMapping("/getDutyClassTree")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "获取机构-班次类型-班次树")
public R<List<DutyClassTypeTree>> getDutyClassTree(@RequestParam(required = false) @ApiParam(value = "机构id") Long deptId) {
return R.data(imsDutyClassService.getDutyClassTree(deptId));
}

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java

@ -1,5 +1,7 @@
package com.hnac.hzims.operational.duty.mapper; package com.hnac.hzims.operational.duty.mapper;
import com.hnac.hzims.common.pojo.Tree;
import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.annotation.UserDataAuth;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
@ -32,4 +34,10 @@ public interface ImsDutyClassMapper extends UserDataScopeBaseMapper<ImsDutyClass
String getClassTypeIds(@Param("createDept") Long createDept,@Param("classTypeId") Long classTypeId); String getClassTypeIds(@Param("createDept") Long createDept,@Param("classTypeId") Long classTypeId);
List<DutyClassTypeTree> getDutyClassTree(@Param("deptId")Long deptId);
List<DutyClassTypeTree> getDutyClassByType(@Param("class_type_id") Long classTypeId);
List<DutyClassTypeTree> getDutyClassTypeByDept(@Param("create_dept") Long deptId);
} }

42
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml

@ -17,6 +17,23 @@
<result column="STATUS" property="status"/> <result column="STATUS" property="status"/>
<result column="CREATE_DEPT" property="createDept"/> <result column="CREATE_DEPT" property="createDept"/>
</resultMap> </resultMap>
<resultMap id="deptClassTypeTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree">
<id column="create_dept" property="id"/>
<collection property="children" column="{create_dept = create_dept}" select="getDutyClassTypeByDept"></collection>
</resultMap>
<resultMap id="dutyClassTypeTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree">
<id column="id" property="id"/>
<result column="class_type_name" property="name"/>
<collection property="children" column="{class_type_id = id}" select="getDutyClassByType"></collection>
</resultMap>
<resultMap id="dutyClassTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree">
<id column="id" property="id"/>
<result column="class_name" property="name"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID, TENANT_ID,CLASS_TYPE_ID,CLASS_NAME, START_TIME, END_TIME, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, ID, TENANT_ID,CLASS_TYPE_ID,CLASS_NAME, START_TIME, END_TIME, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER,
IS_DELETED,STATUS,CREATE_DEPT IS_DELETED,STATUS,CREATE_DEPT
@ -75,4 +92,29 @@
and CLASS_TYPE_ID &lt;&gt; #{classTypeId} and CLASS_TYPE_ID &lt;&gt; #{classTypeId}
</if> </if>
</select> </select>
<select id="getDutyClassByType" resultMap="dutyClassTree">
select `id`,`class_name`
from `hz_ims_duty_class`
where `is_deleted` = 0
and `class_type_id` = #{class_type_id}
</select>
<select id="getDutyClassTypeByDept" resultMap="dutyClassTypeTree">
select distinct ct.id,ct.class_type_name
from `hz_ims_duty_class_type` ct,`hz_ims_duty_class` dc
where ct.`id` = dc.`class_type_id`
and ct.`is_deleted` = 0
and dc.`is_deleted` = 0
and ct.create_dept = #{create_dept}
</select>
<select id="getDutyClassTree" resultMap="deptClassTypeTree">
select distinct `create_dept`
from `hz_ims_duty_class_type`
where `is_deleted` = 0
<if test="deptId != null and deptId != ''">
and `create_dept` = #{deptId}
</if>
</select>
</mapper> </mapper>

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java

@ -1,6 +1,8 @@
package com.hnac.hzims.operational.duty.service; package com.hnac.hzims.operational.duty.service;
import com.hnac.hzims.common.pojo.Tree;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -32,6 +34,6 @@ public interface IImsDutyClassService extends BaseService<ImsDutyClassEntity> {
R typeRemove(Long classTypeId); R typeRemove(Long classTypeId);
List<DutyClassTypeTree> getDutyClassTree(Long deptId);
} }

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java

@ -1,19 +1,23 @@
package com.hnac.hzims.operational.duty.service.impl; package com.hnac.hzims.operational.duty.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.common.pojo.Tree;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.mapper.ImsDutyClassMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyClassMapper;
import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper;
import com.hnac.hzims.operational.duty.service.IImsDutyClassService; import com.hnac.hzims.operational.duty.service.IImsDutyClassService;
import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.system.feign.ISysClient;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -26,6 +30,8 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl<ImsDutyClassMapper,
@Autowired @Autowired
private ImsDutyMainMapper imsDutyMainMapper; private ImsDutyMainMapper imsDutyMainMapper;
@Autowired
private ISysClient sysClient;
@Override @Override
public R saveOrUpdateImsDutyClass(ImsDutyClassEntity imsDutyClass) { public R saveOrUpdateImsDutyClass(ImsDutyClassEntity imsDutyClass) {
if (null == imsDutyClass.getClassTypeId()) { if (null == imsDutyClass.getClassTypeId()) {
@ -104,4 +110,13 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl<ImsDutyClassMapper,
return R.status(bool); return R.status(bool);
} }
@Override
public List<DutyClassTypeTree> getDutyClassTree(Long deptId) {
List<DutyClassTypeTree> dutyClassTrees = this.baseMapper.getDutyClassTree(deptId);
dutyClassTrees.forEach(node -> {
node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null));
});
return dutyClassTrees;
}
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java

@ -144,10 +144,10 @@ public class OperMaintenanceTaskServiceImpl extends BaseServiceImpl<OperMaintena
isNull(OperMaintenanceTaskEntity::getTicketId); isNull(OperMaintenanceTaskEntity::getTicketId);
} }
if (!StringUtil.isEmpty(req.getStartTime())) { if (!StringUtil.isEmpty(req.getStartTime())) {
gt(OperMaintenanceTaskEntity::getDisposeTime, req.getStartTime()); ge(OperMaintenanceTaskEntity::getDisposeTime, req.getStartTime());
} }
if (!StringUtil.isEmpty(req.getEndTime())) { if (!StringUtil.isEmpty(req.getEndTime())) {
lt(OperMaintenanceTaskEntity::getDisposeTime, req.getEndTime()); le(OperMaintenanceTaskEntity::getDisposeTime, req.getEndTime());
} }
if (!CollectionUtils.isEmpty(req.getDeptIds())) { if (!CollectionUtils.isEmpty(req.getDeptIds())) {
in(OperMaintenanceTaskEntity::getCreateDept, req.getDeptIds()); in(OperMaintenanceTaskEntity::getCreateDept, req.getDeptIds());

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SystemFileServiceImpl.java

@ -73,6 +73,9 @@ public class SystemFileServiceImpl extends BaseServiceImpl<SystemFileMapper, Sys
if (null != req.getFileStatus()) { if (null != req.getFileStatus()) {
eq("file_status", req.getFileStatus()); eq("file_status", req.getFileStatus());
} }
if(Func.isNotEmpty(req.getStatus())) {
eq("status", req.getStatus());
}
if (StringUtil.isNotBlank(req.getFileName())) { if (StringUtil.isNotBlank(req.getFileName())) {
like("file_name", req.getFileName()); like("file_name", req.getFileName());
} }

19
hzims-service/safeproduct/src/main/resources/file/体系文件审批.bpmn20.xml

@ -6,8 +6,11 @@
<flowable:formProperty id="assignee" name="assignee" type="string" required="true"></flowable:formProperty> <flowable:formProperty id="assignee" name="assignee" type="string" required="true"></flowable:formProperty>
</extensionElements> </extensionElements>
</startEvent> </startEvent>
<userTask id="sid-71423AA7-A1EF-4F95-BB7B-1E97FCC9164C" name="审核人审批 <userTask id="sid-71423AA7-A1EF-4F95-BB7B-1E97FCC9164C" name="审核人审批 " flowable:candidateGroups="SystemFileApprover" flowable:formFieldValidation="true">
" flowable:formFieldValidation="true" flowable:candidateUsers="${approver}"></userTask> <extensionElements>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
<exclusiveGateway id="sid-4AF1B2EB-29BE-4505-9295-D28FAEA3D998" name="审批"></exclusiveGateway> <exclusiveGateway id="sid-4AF1B2EB-29BE-4505-9295-D28FAEA3D998" name="审批"></exclusiveGateway>
<endEvent id="sid-A9D2F619-A88E-44F1-A1C7-03C75B3C6B14" name="结束"></endEvent> <endEvent id="sid-A9D2F619-A88E-44F1-A1C7-03C75B3C6B14" name="结束"></endEvent>
<endEvent id="sid-FEF7443A-B328-4BBD-9A84-180D335F498E" name="结束"></endEvent> <endEvent id="sid-FEF7443A-B328-4BBD-9A84-180D335F498E" name="结束"></endEvent>
@ -38,16 +41,16 @@
<omgdc:Bounds height="28.0" width="28.0" x="381.0" y="495.0"></omgdc:Bounds> <omgdc:Bounds height="28.0" width="28.0" x="381.0" y="495.0"></omgdc:Bounds>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-C2DD2501-6266-4819-9BC4-36148F90FCAD" id="BPMNEdge_sid-C2DD2501-6266-4819-9BC4-36148F90FCAD"> <bpmndi:BPMNEdge bpmnElement="sid-C2DD2501-6266-4819-9BC4-36148F90FCAD" id="BPMNEdge_sid-C2DD2501-6266-4819-9BC4-36148F90FCAD">
<omgdi:waypoint x="309.9499999999926" y="330.1843173431734"></omgdi:waypoint> <omgdi:waypoint x="309.9499999998759" y="330.0"></omgdi:waypoint>
<omgdi:waypoint x="375.42592592592536" y="330.4259259259259"></omgdi:waypoint> <omgdi:waypoint x="375.0" y="330.0"></omgdi:waypoint>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-C7178FEF-98F6-44A5-A354-7BB83575C565" id="BPMNEdge_sid-C7178FEF-98F6-44A5-A354-7BB83575C565"> <bpmndi:BPMNEdge bpmnElement="sid-C7178FEF-98F6-44A5-A354-7BB83575C565" id="BPMNEdge_sid-C7178FEF-98F6-44A5-A354-7BB83575C565">
<omgdi:waypoint x="414.50393738140417" y="330.43987341772157"></omgdi:waypoint> <omgdi:waypoint x="414.9437303581345" y="330.0"></omgdi:waypoint>
<omgdi:waypoint x="540.0000670136147" y="330.0440062513792"></omgdi:waypoint> <omgdi:waypoint x="540.0" y="330.0"></omgdi:waypoint>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-FACD1E29-B375-4110-B885-E73251B3ED09" id="BPMNEdge_sid-FACD1E29-B375-4110-B885-E73251B3ED09"> <bpmndi:BPMNEdge bpmnElement="sid-FACD1E29-B375-4110-B885-E73251B3ED09" id="BPMNEdge_sid-FACD1E29-B375-4110-B885-E73251B3ED09">
<omgdi:waypoint x="395.44662921348316" y="349.4978804042673"></omgdi:waypoint> <omgdi:waypoint x="395.0" y="349.94443048576215"></omgdi:waypoint>
<omgdi:waypoint x="395.03907547698566" y="495.00005488730324"></omgdi:waypoint> <omgdi:waypoint x="395.0" y="495.0"></omgdi:waypoint>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-7B129759-4330-4970-B29A-8C28FB138B9E" id="BPMNEdge_sid-7B129759-4330-4970-B29A-8C28FB138B9E"> <bpmndi:BPMNEdge bpmnElement="sid-7B129759-4330-4970-B29A-8C28FB138B9E" id="BPMNEdge_sid-7B129759-4330-4970-B29A-8C28FB138B9E">
<omgdi:waypoint x="134.9499990675947" y="330.0"></omgdi:waypoint> <omgdi:waypoint x="134.9499990675947" y="330.0"></omgdi:waypoint>

Loading…
Cancel
Save