haungxing
3 months ago
28 changed files with 823 additions and 25 deletions
@ -0,0 +1,34 @@
|
||||
package com.hnac.hzims.operational.station.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@Accessors(chain = true) |
||||
@TableName("hzims_station_frame_record") |
||||
public class FrameRecordEntity extends TenantEntity { |
||||
|
||||
@ApiModelProperty("站点ID") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty("站点名称") |
||||
private String stationName; |
||||
|
||||
@ApiModelProperty("实时画面ID") |
||||
private String frameId; |
||||
|
||||
@ApiModelProperty("实时画面名称") |
||||
private String frameName; |
||||
|
||||
@ApiModelProperty("实时画面地址") |
||||
private String frameAddress; |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.hnac.hzims.operational.station.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@Accessors(chain = true) |
||||
@TableName("hzims_user_dept_config") |
||||
public class UserDeptConfigEntity extends TenantEntity { |
||||
|
||||
@ApiModelProperty("机构Id") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty("机构名称") |
||||
private String deptName; |
||||
|
||||
@ApiModelProperty("机构类别: 4-站点 3-区域 2,1-集团") |
||||
private Integer deptCategory; |
||||
|
||||
@ApiModelProperty("站点ID") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty("站点名称") |
||||
private String stationName; |
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2024-08-16 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生考核表VO类") |
||||
public class HygieneEvaluationPageVO { |
||||
|
||||
@ApiModelProperty(value = "总分") |
||||
private Long totalScore; |
||||
|
||||
@ApiModelProperty(value = "备注") |
||||
private String remark; |
||||
|
||||
@ApiModelProperty(value = "周数据列表") |
||||
private List<HygieneWeekVO> weekList; |
||||
|
||||
@ApiModelProperty(value = "考核人员列表") |
||||
private List<HygieneEvaluationPeopleVO> evaluationList; |
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2024-08-16 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生考核分数VO类") |
||||
public class HygieneEvaluationPeopleVO { |
||||
|
||||
@ApiModelProperty(value = "单位") |
||||
private String unit; |
||||
|
||||
@ApiModelProperty(value = "负责人") |
||||
private String principal; |
||||
|
||||
@ApiModelProperty(value = "合计分") |
||||
private Long sumScore; |
||||
|
||||
@ApiModelProperty(value = "考核分列表") |
||||
private List<HygieneEvaluationScoreVO> scoreList; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2024-08-16 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生考核分VO类") |
||||
public class HygieneEvaluationScoreVO { |
||||
|
||||
@ApiModelProperty(value = "周数") |
||||
private Integer weekNum; |
||||
|
||||
@ApiModelProperty(value = "考核分") |
||||
private Long score; |
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2024-08-16 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生周数据VO类") |
||||
public class HygieneWeekVO { |
||||
|
||||
@ApiModelProperty(value = "周数") |
||||
private Integer weekNum; |
||||
|
||||
@ApiModelProperty(value = "周开始日") |
||||
private Date startDate; |
||||
|
||||
@ApiModelProperty(value = "周结束日") |
||||
private Date endDate; |
||||
} |
@ -0,0 +1,49 @@
|
||||
package com.hnac.hzims.operational.station.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.operational.station.entity.FrameRecordEntity; |
||||
import com.hnac.hzims.operational.station.entity.VideoRecordEntity; |
||||
import com.hnac.hzims.operational.station.service.FrameRecordService; |
||||
import com.hnac.hzims.operational.station.service.VideoRecordService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/station/frameRecord") |
||||
@RequiredArgsConstructor |
||||
@Api(value = "站点实时画面保存记录", tags = "实时画面保存记录") |
||||
public class StationFrameRecordController extends BladeController { |
||||
|
||||
private final FrameRecordService frameRecordService; |
||||
|
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "新增或修改站点视频播放保存记录", notes = "传入VideoRecordEntity") |
||||
public R submit(@Valid @RequestBody FrameRecordEntity entity) { |
||||
return R.status(frameRecordService.saveOrUpdate(entity)); |
||||
} |
||||
|
||||
@GetMapping("/query") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "查询站点视频播放保存记录", notes = "传入VideoRecordEntity") |
||||
public R query(@RequestParam("stationId") String stationId, |
||||
@RequestParam("userId") String userId) { |
||||
return R.data(frameRecordService.getOne(Wrappers.<FrameRecordEntity>lambdaQuery() |
||||
.eq(FrameRecordEntity::getStationId,stationId) |
||||
.eq(FrameRecordEntity::getCreateUser,userId) |
||||
)); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,47 @@
|
||||
package com.hnac.hzims.operational.station.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.operational.station.entity.UserDeptConfigEntity; |
||||
import com.hnac.hzims.operational.station.entity.VideoRecordEntity; |
||||
import com.hnac.hzims.operational.station.service.UserDeptConfigService; |
||||
import com.hnac.hzims.operational.station.service.VideoRecordService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/userDept/config") |
||||
@RequiredArgsConstructor |
||||
@Api(value = "用户机构配置保存记录", tags = "用户机构配置保存记录") |
||||
public class UserDeptConfigController extends BladeController { |
||||
|
||||
private final UserDeptConfigService userDeptConfigService; |
||||
|
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "新增或修改用户机构配置记录", notes = "传入UserDeptConfigEntity") |
||||
public R submit(@Valid @RequestBody UserDeptConfigEntity entity) { |
||||
return R.status(userDeptConfigService.submit(entity)); |
||||
} |
||||
|
||||
@GetMapping("/query") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "查询站点用户机构配置保存记录", notes = "传入userId") |
||||
public R query(@RequestParam("userId") String userId) { |
||||
return R.data(userDeptConfigService.getOne(Wrappers.<UserDeptConfigEntity>lambdaQuery() |
||||
.eq(UserDeptConfigEntity::getCreateUser,userId) |
||||
)); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.operational.station.mapper; |
||||
|
||||
import com.hnac.hzims.operational.station.entity.FrameRecordEntity; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface FrameRecordMapper extends UserDataScopeBaseMapper<FrameRecordEntity> { |
||||
|
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.operational.station.mapper.FrameRecordMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.operational.station.mapper.UserDeptConfigMapper"> |
||||
</mapper> |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.operational.station.mapper; |
||||
|
||||
import com.hnac.hzims.operational.station.entity.UserDeptConfigEntity; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface UserDeptConfigMapper extends UserDataScopeBaseMapper<UserDeptConfigEntity> { |
||||
|
||||
} |
@ -0,0 +1,10 @@
|
||||
package com.hnac.hzims.operational.station.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.operational.station.entity.FrameRecordEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface FrameRecordService extends IService<FrameRecordEntity> { |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.operational.station.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.operational.station.entity.UserDeptConfigEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface UserDeptConfigService extends IService<UserDeptConfigEntity> { |
||||
boolean submit(UserDeptConfigEntity entity); |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.hnac.hzims.operational.station.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.hnac.hzims.operational.station.entity.FrameRecordEntity; |
||||
import com.hnac.hzims.operational.station.entity.VideoRecordEntity; |
||||
import com.hnac.hzims.operational.station.mapper.FrameRecordMapper; |
||||
import com.hnac.hzims.operational.station.mapper.VideoRecordMapper; |
||||
import com.hnac.hzims.operational.station.service.FrameRecordService; |
||||
import com.hnac.hzims.operational.station.service.VideoRecordService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author 86187 |
||||
*/ |
||||
@Service |
||||
@RequiredArgsConstructor |
||||
@Slf4j |
||||
public class FrameRecordServiceImpl extends ServiceImpl<FrameRecordMapper, FrameRecordEntity> implements FrameRecordService { |
||||
|
||||
} |
@ -0,0 +1,64 @@
|
||||
package com.hnac.hzims.operational.station.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.hnac.hzims.operational.station.entity.StationEntity; |
||||
import com.hnac.hzims.operational.station.entity.UserDeptConfigEntity; |
||||
import com.hnac.hzims.operational.station.mapper.UserDeptConfigMapper; |
||||
import com.hnac.hzims.operational.station.service.IStationService; |
||||
import com.hnac.hzims.operational.station.service.UserDeptConfigService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.system.entity.Dept; |
||||
import org.springblade.system.feign.ISysClient; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author 86187 |
||||
*/ |
||||
@Service |
||||
@RequiredArgsConstructor |
||||
@Slf4j |
||||
public class UserDeptConfigServiceImpl extends ServiceImpl<UserDeptConfigMapper, UserDeptConfigEntity> implements UserDeptConfigService { |
||||
|
||||
private final ISysClient sysClient; |
||||
|
||||
private final IStationService stationService; |
||||
|
||||
/** |
||||
* 保存用户机构配置 |
||||
* @param entity |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean submit(UserDeptConfigEntity entity) { |
||||
if(ObjectUtil.isEmpty(entity.getDeptId())){ |
||||
return false; |
||||
} |
||||
R<Dept> dept = sysClient.getDept(entity.getDeptId()); |
||||
if(!dept.isSuccess() || ObjectUtil.isEmpty(dept.getData())){ |
||||
return false; |
||||
} |
||||
entity.setDeptName(dept.getData().getDeptName()); |
||||
entity.setDeptCategory(dept.getData().getDeptCategory()); |
||||
if(dept.getData().getDeptCategory() == 4){ |
||||
StationEntity station = stationService.getOne(Wrappers.<StationEntity>lambdaQuery() |
||||
.eq(StationEntity::getRefDept,dept.getData().getId()) |
||||
); |
||||
if(ObjectUtil.isNotEmpty(station)){ |
||||
entity.setStationId(station.getCode()); |
||||
entity.setStationName(station.getName()); |
||||
}else{ |
||||
entity.setStationId(null); |
||||
entity.setStationName(null); |
||||
} |
||||
}else{ |
||||
entity.setStationId(null); |
||||
entity.setStationName(null); |
||||
} |
||||
|
||||
return super.saveOrUpdate(entity); |
||||
} |
||||
} |
Loading…
Reference in new issue