修复师傅查询分页bug + 待付款状态查询

This commit is contained in:
kuang.yife 2023-06-14 21:34:00 +08:00
parent 77a45f2c52
commit 9a193669b8
2 changed files with 10 additions and 3 deletions

View File

@ -128,7 +128,7 @@ public class OrderDetailController extends BaseController {
List<FinancialMaster> financialMasters = financialMasterService.selectByOrderMasterIds(orderMasterIds);
Map<Long, FinancialMaster> financialMasterMap = new HashMap<>();
if(0 == orderDetail.getSysPayStatus()){
if(orderDetail.getSysPayStatus() != null && 0 == orderDetail.getSysPayStatus()){
financialMasterMap = financialMasters
.stream().filter(financialMaster->0 == financialMaster.getPayStatus()).collect(Collectors.toMap(FinancialMaster::getOrderMasterId, x -> x, (x, y) -> y));
}else {

View File

@ -24,6 +24,7 @@ import com.ghy.worker.domain.WorkerArea;
import com.ghy.worker.domain.WorkerBank;
import com.ghy.worker.domain.WorkerGoodsCategory;
import com.ghy.worker.service.*;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.util.Assert;
@ -154,6 +155,7 @@ public class WorkerController extends BaseController {
worker.setDeptId(this.getSysUser().getDept().getParentId());
}
List<Worker> list = workerService.getWorkList(worker);
TableDataInfo dataTable = getDataTable(list);
list.forEach(w -> {
Goods goods = new Goods();
goods.setWorkerId(w.getWorkerId());
@ -164,13 +166,18 @@ public class WorkerController extends BaseController {
workerListResponse.setGoodsCategories(workerGoodsCategoryService.getByWorker(w.getWorkerId()));
workerListResponse.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));
resList.add(workerListResponse);
});
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(resList);
rspData.setTotal(dataTable.getTotal());
return rspData;
} catch (Exception e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
return getDataTable(new ArrayList<>());
}
return getDataTable(resList);
}
@PostMapping("/app/list")