Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 11 months ago
parent
commit
36aa2646a7
  1. 18
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java
  2. 18
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java
  3. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java
  4. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java

18
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java

@ -27,10 +27,8 @@ public class OperConstructionEntity extends TenantEntity {
@ApiModelProperty(value = "施工编号")
private String code;
@ApiModelProperty(value = "施工时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date constructionTime;
@ApiModelProperty(value = "检修名称")
private String constructionTime;
@ApiModelProperty(value = "检修名称")
private String overhaulName;
@ -42,9 +40,15 @@ public class OperConstructionEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long overhaulHead;
@ApiModelProperty(value = "检修负责人")
private String overhaulHeadName;
@ApiModelProperty(value = "检修人员: 根据“,”分割")
private String overhaulPersonnel;
@ApiModelProperty(value = "检修人员名称: 根据“,”分割")
private String overhaulPersonnelName;
@ApiModelProperty(value = "检修时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ -66,8 +70,14 @@ public class OperConstructionEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long recorder;
@ApiModelProperty(value = "记录人名称")
private String recorderName;
@ApiModelProperty(value = "审核人")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long reviewer;
@ApiModelProperty(value = "审核人名称")
private String reviewerName;
}

18
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java

@ -17,22 +17,4 @@ public class ConstructionVo extends OperConstructionEntity {
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "创建人名称")
private String createUserName;
@ApiModelProperty(value = "修改人名称")
private String updateUserName;
@ApiModelProperty(value = "检修负责人名称")
private String overhaulHeadName;
@ApiModelProperty(value = "记录人名称")
private String recorderName;
@ApiModelProperty(value = "审核人名称")
private String reviewerName;
@ApiModelProperty(value = "检修人员名称Name")
private String overhaulPersonnelName;
}

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java

@ -23,11 +23,13 @@ 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.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
@ -46,6 +48,8 @@ public class ConstructionController extends BladeController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增")
public R save(@RequestBody OperConstructionEntity entity) {
entity.setCode("SGRZ" + DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME_MINI));
entity.setConstructionTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME));
return R.status(service.save(entity));
}
@ -65,10 +69,10 @@ public class ConstructionController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "检修管理",title = "检修计划",operatorType = OperatorType.MOBILE,businessType =
@OperationAnnotation(moduleName = "施工日志",title = "施工日志",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询检修计划列表")
@ApiOperation(value = "分页 查询参数:code,name,gradeCode,manager,techLead,handleStatus,status")
action = "分页查询施工日志")
@ApiOperation(value = "分页")
public R<IPage<ConstructionVo>> list(ConstructionVo construction, Query query) {
return R.data(service.pageCondition(Condition.getPage(query), construction));
}

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java

@ -7,7 +7,6 @@ import com.hnac.hzims.operational.access.entity.OperConstructionEntity;
import com.hnac.hzims.operational.access.mapper.ConstructionMapper;
import com.hnac.hzims.operational.access.service.ConstructionService;
import com.hnac.hzims.operational.access.vo.ConstructionVo;
import com.hnac.hzims.operational.access.wrapper.ConstructionWrapper;
import com.hnac.hzims.operational.util.ExcelUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -15,7 +14,6 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.beans.factory.annotation.Value;
@ -57,9 +55,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper,
if(StringUtil.isNotBlank(construction.getEndTime())){
wrapper.le("CREATE_TIME",construction.getEndTime());
}
IPage pages = super.page(page, wrapper);
pages.setRecords(ConstructionWrapper.build().listVO(pages.getRecords()));
return pages;
return super.page(page, wrapper);
}
/**
@ -71,7 +67,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper,
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse();
//准备数据
ConstructionVo construction = this.record(id);
OperConstructionEntity construction = this.record(id);
Map<String,Object> params = new HashMap<>();
/*try {
params = PdfUtils.objectToMap(construction);
@ -106,11 +102,11 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper,
* @param id
* @return
*/
private ConstructionVo record(Long id) {
private OperConstructionEntity record(Long id) {
OperConstructionEntity entity = this.getById(id);
if(ObjectUtil.isEmpty(entity)){
throw new ServiceException("施工日志记录不存在!");
}
return ConstructionWrapper.build().entityVO(entity);
return entity;
}
}
Loading…
Cancel
Save