Browse Source

update: 卫生自查模块

zhongwei
liwen 11 months ago
parent
commit
4b191b643a
  1. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java
  2. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java
  3. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java
  4. 6
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java
  5. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
  6. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml
  7. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.xml
  8. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java

3
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java

@ -24,6 +24,9 @@ public class HygienePlanDTO extends BaseEntity {
@ApiModelProperty("卫生自查计划id") @ApiModelProperty("卫生自查计划id")
private Long id; private Long id;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("计划名称") @ApiModelProperty("计划名称")
private String name; private String name;

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

@ -24,6 +24,9 @@ public class HygienePlanEntity extends BaseEntity {
@ApiModelProperty("计划名称") @ApiModelProperty("计划名称")
private String name; private String name;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("标准总分值") @ApiModelProperty("标准总分值")
private Integer standardScore; private Integer standardScore;

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

@ -59,7 +59,4 @@ public class HygieneRecordEntity extends BaseEntity {
@Size(max = 1000, message = "检查图片字段长度不能超过1000") @Size(max = 1000, message = "检查图片字段长度不能超过1000")
@ApiModelProperty("检查图片") @ApiModelProperty("检查图片")
private String imgPath; private String imgPath;
@ApiModelProperty("自查记录状态")
private String hygieneRecordStatus;
} }

6
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java

@ -21,6 +21,12 @@ import java.util.List;
@ApiModel(value = "卫生自查计划详情VO类") @ApiModel(value = "卫生自查计划详情VO类")
public class HygienePlanDetailVO extends BaseEntity { public class HygienePlanDetailVO extends BaseEntity {
@ApiModelProperty("计划名称")
private String name;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("标准总分值") @ApiModelProperty("标准总分值")
private Integer standardScore; private Integer standardScore;

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java

@ -72,6 +72,8 @@ public class HygieneController extends BladeController {
@GetMapping("/planPage") @GetMapping("/planPage")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "name", value = "名称", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), @ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string") @ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string")
}) })

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

@ -20,9 +20,9 @@
<select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO"> <select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO">
SELECT SELECT
unit, count(1) as finished_task_num unit, count(1) as finished_check_num
FROM FROM
hzims_hygiene_record hzims_hygiene_plan
WHERE WHERE
is_deleted = 0 is_deleted = 0
AND scheduled_end_time like concat('%', #{month}, '%') AND scheduled_end_time like concat('%', #{month}, '%')

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

@ -20,7 +20,7 @@
WHERE WHERE
is_deleted = 0 is_deleted = 0
<if test="param.hygienePlanId != null and param.hygienePlanId != ''"> <if test="param.hygienePlanId != null and param.hygienePlanId != ''">
AND hygiene_plan_id = #{hygienePlanId} AND hygiene_plan_id = #{param.hygienePlanId}
</if> </if>
ORDER BY ORDER BY
create_time DESC create_time DESC

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java

@ -79,12 +79,20 @@ public class HygienePlanServiceImpl extends ServiceImpl<HygienePlanMapper, Hygie
QueryWrapper<HygienePlanEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<HygienePlanEntity> queryWrapper = new QueryWrapper<>();
String startTime = String.valueOf(param.get("scheduledStartTime")); String startTime = String.valueOf(param.get("scheduledStartTime"));
String endTime = String.valueOf(param.get("scheduledEndTime")); String endTime = String.valueOf(param.get("scheduledEndTime"));
String unit = String.valueOf(param.get("unit"));
String name = String.valueOf(param.get("name"));
if (!startTime.equals("null") && !startTime.equals("")) { if (!startTime.equals("null") && !startTime.equals("")) {
queryWrapper.lambda().ge(HygienePlanEntity::getScheduledStartTime, startTime); queryWrapper.lambda().ge(HygienePlanEntity::getScheduledStartTime, startTime);
} }
if (!endTime.equals("null") && !endTime.equals("")) { if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(HygienePlanEntity::getScheduledEndTime, endTime); queryWrapper.lambda().le(HygienePlanEntity::getScheduledEndTime, endTime);
} }
if (!unit.equals("null") && !unit.equals("")) {
queryWrapper.lambda().like(HygienePlanEntity::getUnit, unit);
}
if (!name.equals("null") && !name.equals("")) {
queryWrapper.lambda().like(HygienePlanEntity::getName, name);
}
queryWrapper.lambda().orderByDesc(HygienePlanEntity::getCreateTime); queryWrapper.lambda().orderByDesc(HygienePlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper); return this.page(Condition.getPage(query), queryWrapper);
} }

Loading…
Cancel
Save