人员附件修改相关1.0
This commit is contained in:
parent
bcd3d389a7
commit
5c1332690c
|
@ -67,7 +67,7 @@ public class Personnel extends BaseEntity {
|
|||
private String education;
|
||||
|
||||
@ApiModelProperty(value = "是否应届毕业生")
|
||||
private Boolean freshGraduate;
|
||||
private Integer freshGraduate;
|
||||
|
||||
@ApiModelProperty(value = "毕业院校")
|
||||
private String academy;
|
||||
|
|
|
@ -32,7 +32,7 @@ public class PersonnelRequest {
|
|||
|
||||
@ApiModelProperty(value = "性别")
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Boolean gender;
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.thymeleaf.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.Null;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -249,7 +250,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
}
|
||||
return path;
|
||||
}
|
||||
return null;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public void saveAlteration(String details,Object before ,Object after,String type, String id){
|
||||
|
@ -258,8 +259,12 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
alteration.setDetails(details);
|
||||
alteration.setType(type);
|
||||
alteration.setRelevancyId(id);
|
||||
alteration.setBeforeChange((String) before);
|
||||
alteration.setAfterChange((String) after);
|
||||
if (ObjectUtil.isNotNull(before)){
|
||||
alteration.setBeforeChange( before.toString());
|
||||
}else {
|
||||
alteration.setBeforeChange("无");
|
||||
}
|
||||
alteration.setAfterChange(after.toString());
|
||||
alterationMapper.insert(alteration);
|
||||
}
|
||||
|
||||
|
@ -268,8 +273,8 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
if (StrUtil.isNotBlank(file)){
|
||||
List<String> cardFile = Arrays.asList(file.split(","));
|
||||
ArrayList<AttachmentDto> attachmentDtos = new ArrayList<>();
|
||||
AttachmentDto dto = new AttachmentDto();
|
||||
for (String s : cardFile) {
|
||||
AttachmentDto dto = new AttachmentDto();
|
||||
Attachment attachment = attachmentService.selectByIdAndPath(id, s);
|
||||
if (ObjectUtil.isNotEmpty(attachment)){
|
||||
dto.setName(attachment.getName());
|
||||
|
@ -277,6 +282,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
dto.setSize(attachment.getSize());
|
||||
attachmentDtos.add(dto);
|
||||
}
|
||||
|
||||
}
|
||||
return attachmentDtos;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue