bug修复
parent
038b1e2742
commit
06db8d613b
|
@ -133,7 +133,7 @@ public class ProcurementTypeController extends BaseController{
|
|||
Map<String, String> searchInfo = getSearchInfo(keywords);
|
||||
downloadHeader(httpServletResponse , Utils.generateExcelName("采购类型表"), "application/octet-stream");
|
||||
String[] headers = {"采购类型名称","所属大类","创建人","创建时间"};
|
||||
String[] exportColumns = {"name","category","createdBy","createdTime"};
|
||||
String[] exportColumns = {"name","typeName","createdBy","createdTime"};
|
||||
ExportUtils.exportToExcel(headers, exportColumns, 1, 10000,
|
||||
httpServletResponse.getOutputStream(), (pN, pS) -> procurementTypeService.list(searchInfo, pN, pS).getList());
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ public class ProcurementType {
|
|||
@Column(name = "created_by")
|
||||
private String createdBy;
|
||||
|
||||
@Transient
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
@ -39,6 +42,14 @@ public class ProcurementType {
|
|||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createdTime;
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -412,6 +412,7 @@ public class AccountService {
|
|||
admin.setCreatedTime(new Date());
|
||||
admin.setLastUpdatedBy(createAdminId);
|
||||
admin.setLastUpdatedTime(new Date());
|
||||
admin.setEnabled(1);
|
||||
adminRepository.saveAndFlush(admin);
|
||||
|
||||
//设置当前用户角色关系状态为删除
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
|||
import top.jfunc.common.db.QueryHelper;
|
||||
import top.jfunc.common.db.bean.Page;
|
||||
import top.jfunc.common.db.utils.Pagination;
|
||||
import top.jfunc.common.utils.CollectionUtil;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -33,7 +34,30 @@ public class ProcurementTypeService {
|
|||
queryHelper.addCondition(searchInfo.containsKey("startTime"), "created_time >= ?", searchInfo.get("startTime") + " 00:00:00");
|
||||
queryHelper.addCondition(searchInfo.containsKey("endTime"), "created_time <= ?", searchInfo.get("endTime") + " 23:59:59");
|
||||
queryHelper.addOrderProperty("created_time", false);
|
||||
return pagination.paginate(queryHelper.getSql(), ProcurementType.class,pageNumber,pageSize);
|
||||
Page<ProcurementType> paginate = pagination.paginate(queryHelper.getSql(), ProcurementType.class, pageNumber, pageSize);
|
||||
List<ProcurementType> list = paginate.getList();
|
||||
typeName(list);
|
||||
paginate.setList(list);
|
||||
return paginate;
|
||||
}
|
||||
|
||||
public void typeName(List<ProcurementType> list){
|
||||
if(CollectionUtil.isNotEmpty(list)){
|
||||
for (ProcurementType procurementType : list) {
|
||||
if(procurementType.getType() == 1){
|
||||
procurementType.setTypeName("设备");
|
||||
}
|
||||
if(procurementType.getType() == 2){
|
||||
procurementType.setTypeName("服务");
|
||||
}
|
||||
if(procurementType.getType() == 3){
|
||||
procurementType.setTypeName("施工");
|
||||
}
|
||||
if(procurementType.getType() == 4){
|
||||
procurementType.setTypeName("其他");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ProcurementType findOne(int id) {
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
font-size: 14px;
|
||||
}
|
||||
.approve-nopass:after {
|
||||
content:"审核不过";
|
||||
content:"审核不通过";
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue