Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 2 years ago
parent
commit
35023606b1
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsSchedulingVo.java
  2. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/DutyGroupGeneratingCapacityController.java
  3. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyChangeController.java
  4. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java
  5. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java
  6. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java
  7. 29
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java
  8. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainTemplateController.java
  9. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java
  10. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecQRRecordController.java
  11. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyGroupPMapper.java
  12. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyGroupPMapper.xml
  13. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml
  14. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyMainService.java
  15. 18
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsSchedulingVo.java

@ -56,6 +56,8 @@ public class ImsSchedulingVo extends ImsDutyMainEntity {
private String classTypeName;
@ApiModelProperty("班组负责人")
private Long managerId;
@ApiModelProperty("班组负责人名称")
private String managerName;
@ApiModelProperty("用户名称")
private String userName;

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/DutyGroupGeneratingCapacityController.java

@ -9,7 +9,6 @@ import com.hnac.hzims.operational.duty.vo.StationDutyGroupGenerationVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@ -38,7 +37,6 @@ public class DutyGroupGeneratingCapacityController extends BladeController {
/**
* 查询分页数据
*/
@ApiLog
@ApiOperation(value = "查询分页数据")
@RequestMapping(value = "/list")
@ApiOperationSupport(order = 20)
@ -51,7 +49,6 @@ public class DutyGroupGeneratingCapacityController extends BladeController {
/**
* 详情
*/
@ApiLog
@GetMapping("/detail")
@ApiOperation(value = "详情")
@ApiOperationSupport(order = 30)

17
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyChangeController.java

@ -1,28 +1,27 @@
package com.hnac.hzims.operational.duty.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.duty.entity.ImsDutyChangeEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyChangeService;
import com.hnac.hzims.operational.duty.service.IImsDutyMainService;
import com.hnac.hzims.operational.duty.vo.ImsDutyChangeTowVo;
import com.hnac.hzims.operational.duty.vo.ImsDutyChangeVO;
import com.hnac.hzims.operational.duty.vo.ImsSchedulingVo;
import com.hnac.hzims.operational.duty.wrapper.ImsDutyChangeWrapper;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.flow.core.entity.BladeFlow;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.duty.wrapper.ImsDutyChangeWrapper;
import com.hnac.hzims.operational.duty.service.IImsDutyChangeService;
import javax.validation.Valid;
@ -44,7 +43,6 @@ public class ImsDutyChangeController extends BladeController {
/**
* 详情
*/
@ApiLog
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入dutyChange")
@ -64,7 +62,6 @@ public class ImsDutyChangeController extends BladeController {
/**
* 详情
*/
@ApiLog
@GetMapping("/detail/test")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情示例", notes = "传入dutyChange")
@ -77,7 +74,6 @@ public class ImsDutyChangeController extends BladeController {
*
* @param businessId 主键
*/
@ApiLog
@GetMapping("/detailById")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入 主键Id")
@ -89,7 +85,6 @@ public class ImsDutyChangeController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入dutyChange")
@ -151,8 +146,6 @@ public class ImsDutyChangeController extends BladeController {
return R.status(imsDutyService.completeTask(flow,changeEntity));
}
@ApiLog
@PostMapping("/getList")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "查询调班记录", notes = "")

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

@ -4,14 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.entity.ImsDutyGroupEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@ -38,7 +36,6 @@ public class ImsDutyClassController extends BladeController {
/**
* 详情
*/
@ApiLog
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyClass")
@ -50,7 +47,6 @@ public class ImsDutyClassController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyClass")
@ -66,7 +62,6 @@ public class ImsDutyClassController extends BladeController {
/**
* 查询所有班次列表(不分页)
*/
@ApiLog
@GetMapping("/getlist")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyClass")

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java

@ -10,12 +10,10 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@ -49,7 +47,6 @@ public class ImsDutyClassTypeController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyClassType")
@ -66,7 +63,6 @@ public class ImsDutyClassTypeController extends BladeController {
/**
* 获取所有班次类型 代码自定义代号
*/
@ApiLog
@GetMapping("/listClassType")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "获取所有班次类型")
@ -103,7 +99,6 @@ public class ImsDutyClassTypeController extends BladeController {
/**
* 获取不存在班次中的班次类型
*/
@ApiLog
@GetMapping("/classTypeList")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "获取不存在班次中的班次类型", notes = "传入ids")

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java

@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
@ -41,7 +40,6 @@ public class ImsDutyGroupController extends BladeController {
/**
* 班组详情
*/
@ApiLog
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "班组详情", notes = "传入imsDutyGroup")
@ -53,7 +51,6 @@ public class ImsDutyGroupController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyGroup")
@ -142,7 +139,6 @@ public class ImsDutyGroupController extends BladeController {
/**
* 人员分组查询
*/
@ApiLog
@PostMapping("/personGroupAll")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "人员分组查询", notes = "传入imsDutyGroup")
@ -164,7 +160,6 @@ public class ImsDutyGroupController extends BladeController {
/**
*查询所有班组 负责人 is not null
*/
@ApiLog
@GetMapping("/list-manager")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询所有班组(已有负责人的班组)", notes = "传入imsDutyGroup")

29
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java

@ -11,7 +11,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
@ -50,7 +49,6 @@ public class ImsDutyMainController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyMain")
@ -63,7 +61,6 @@ public class ImsDutyMainController extends BladeController {
/**
* 根据时间查询所有值班信息列表(不分页)
*/
@ApiLog
@GetMapping("/getList")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain")
@ -101,18 +98,26 @@ public class ImsDutyMainController extends BladeController {
@ApiOperation(value = "排班管理", notes = "")
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) {
if (null == imsSchedulingVo.getCreateDept()) {
if(true){
}
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
}
return imsDutyMainService.getSchedulingV2(imsSchedulingVo);
}
// /**
// * 排班管理
// */
// @PostMapping("/scheduling")
// @ApiOperationSupport(order = 8)
// @ApiOperation(value = "排班管理", notes = "")
// public R schedulingV2(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) {
// if (null == imsSchedulingVo.getCreateDept()) {
// imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
// }
// return imsDutyMainService.getScheduling(imsSchedulingVo);
// }
/**
* 查询排班
*/
@ApiLog
@PostMapping("/scheduling/list")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month")
@ -168,4 +173,14 @@ public class ImsDutyMainController extends BladeController {
return R.data(imsDutyMainService.getAllPersonInfo(deptId));
}
/**
* 值班人员ID对应班次信息
*/
@GetMapping("/getDutyMainInfoVoById")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "返回对应部门所有人员", notes = "")
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId,@ApiParam(value = "申请人ID") Long personId) {
return imsDutyMainService.getDutyEmergencyEntityById(deptId,personId);
}
}

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainTemplateController.java

@ -9,7 +9,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
@ -32,7 +31,6 @@ public class ImsDutyMainTemplateController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/listAll")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询 不分页", notes = "传入ImsDutyMainTemplateEntity")

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java

@ -15,7 +15,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
@ -47,7 +46,6 @@ public class ImsDutyRecController extends BladeController {
/**
* 详情
*/
@ApiLog
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyRec")
@ -60,7 +58,6 @@ public class ImsDutyRecController extends BladeController {
/**
* 分页 代码自定义代号
*/
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyRec")
@ -73,7 +70,6 @@ public class ImsDutyRecController extends BladeController {
/**
* 自定义分页 附件表
*/
@ApiLog
@GetMapping("/pageList")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页--交接班记录", notes = "传入entity")
@ -148,7 +144,6 @@ public class ImsDutyRecController extends BladeController {
/**
* 指定当天班组为值班中
*/
@ApiLog
@GetMapping("/update")
@ApiOperationSupport(order = 12)
@ApiOperation(value = "指定当天班组为值班中", notes = "传入entity")

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecQRRecordController.java

@ -10,7 +10,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
@ -53,7 +52,6 @@ public class ImsDutyRecQRRecordController extends BladeController {
/**
* 自定义分页 附件表
*/
@ApiLog
@PostMapping("/pageList")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页--交接班扫码记录", notes = "传入vo")

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyGroupPMapper.java

@ -29,7 +29,7 @@ public interface ImsDutyGroupPMapper extends BaseMapper<ImsDutyGroupPEntity> {
*/
List<ImsDutyGroupPEntity> selectByGroupId(Long groupId);
List<ImsDutyGroupPEntity> selectByGroupIds(List<Long> groupId);
List<ImsDutyGroupPEntity> selectByGroupIds(@Param("groupId") List<Long> groupId);
void deleteBatch(List<Long> list);

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

@ -29,12 +29,12 @@
from hz_ims_duty_group_p
where group_id = #{groupId,jdbcType=BIGINT}
</select>
<select id="selectByGroupIds" resultMap="BaseResultMap" parameterType="java.lang.Long" >
<select id="selectByGroupIds" resultMap="BaseResultMap" parameterType="java.util.List" >
select
<include refid="Base_Column_List" />
from hz_ims_duty_group_p
where group_id in
<foreach collection="groupId" item="item" index="index" open="(" close=")" separator=",">
where GROUP_ID in
<foreach collection="groupId" item="item" open="(" separator="," close=")" >
#{item}
</foreach>
</select>
@ -45,7 +45,7 @@
select
<include refid="Base_Column_List" />
from hz_ims_duty_group_p
where group_id = #{groupId,jdbcType=BIGINT}
where ID = #{groupId,jdbcType=BIGINT}
</select>
<select id="selectPersonIdsByGroupId" resultType="java.lang.String">
select

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml

@ -151,7 +151,7 @@
DM.*,
DC.CLASS_NAME AS className,
DC.`START_TIME` AS startTime,
DC.`END_TIME` AS endTime,
DC.`END_TIME` AS endTime
FROM hz_ims_duty_main DM
LEFT JOIN hz_ims_duty_class DC
ON DM.CLASS_ID = DC.ID

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyMainService.java

@ -144,4 +144,6 @@ public interface IImsDutyMainService extends BaseService<ImsDutyMainEntity> {
List<DutyInfoVo> getDutyData(List<Long> deptIdList);
R getAllPersonInfo(Long deptId);
R getDutyEmergencyEntityById(Long deptId, Long personId);
}

18
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

@ -10,6 +10,7 @@ import com.hnac.hzims.operational.defect.constants.DefectConstant;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.defect.mapper.OperPhenomenonMapper;
import com.hnac.hzims.operational.duty.entity.*;
import com.hnac.hzims.operational.duty.enume.DutyMainStatus;
import com.hnac.hzims.operational.duty.enume.DutyRecStatus;
import com.hnac.hzims.operational.duty.enume.JoinStatus;
import com.hnac.hzims.operational.duty.mapper.*;
@ -176,6 +177,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
imsSchedulingVo.setGroupName("临时班组");
ImsDutyMainPersonEntity imsDutyMainPersonEntity = imsDutyMainPersonMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
eq(ImsDutyMainPersonEntity::getDutyMainId, id);
last("limit 1");
}});
imsSchedulingVo.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson());
} else {
@ -1207,6 +1209,22 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
return allUserList;
}
@Override
public R getDutyEmergencyEntityById(Long deptId, Long personId) {
ImsDutyMainEntity entity =this.baseMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainEntity>() {{
eq(ImsDutyMainEntity::getStatus, DutyMainStatus.EXEC.getVal());
eq(ImsDutyMainEntity::getCreateDept, deptId);
like(ImsDutyMainEntity::getDutyPersonIds,AuthUtil.getUserId()).last(" limit 1");
}});
if (ObjectUtil.isEmpty(entity)) {
return R.success("您当前未值班");
}
ImsSchedulingVo imsSchedulingVo = getByIdOneV2(entity.getId(), null);
R<User> userR = userClient.userInfoById(imsSchedulingVo.getManagerId());
imsSchedulingVo.setManagerName(userR.getData().getName());
return R.data(imsSchedulingVo);
}
/**
* 获取上一班组

Loading…
Cancel
Save