|
|
|
@ -3,6 +3,7 @@ package jnpf.saleorder.service.impl;
|
|
|
|
|
import jnpf.arinvoices.entity.ArinvoicesEntity;
|
|
|
|
|
import jnpf.poundlist.entity.PoundlistEntity;
|
|
|
|
|
import jnpf.poundlist.service.PoundlistService;
|
|
|
|
|
import jnpf.receiptin.entity.ReceiptinEntity;
|
|
|
|
|
import jnpf.receiptout.entity.ReceiptoutEntity;
|
|
|
|
|
import jnpf.receiptout.entity.Receiptout_item0Entity;
|
|
|
|
|
import jnpf.receiptout.service.Receiptout_item0Service;
|
|
|
|
@ -87,6 +88,10 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
|
|
|
|
|
@Override
|
|
|
|
|
public List<SaleorderitemEntity> getList(SaleorderitemPagination saleorderitemPagination){
|
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
|
String detpartment = null;
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()) {
|
|
|
|
|
detpartment = userProvider.getDepartmentId(userId);
|
|
|
|
|
}
|
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
|
int total=0;
|
|
|
|
|
int saleorderitemNum =0;
|
|
|
|
@ -242,8 +247,8 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
|
|
|
|
|
Long sec = Long.valueOf(creatorTime.get(1));
|
|
|
|
|
saleorderitemPagination.setStartDate(new Date(fir));
|
|
|
|
|
saleorderitemPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
// saleorderitemQueryWrapper.lambda().ge(SaleorderitemEntity::getCreatorTime, new Date(fir))
|
|
|
|
|
// .le(SaleorderitemEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
saleorderitemQueryWrapper.lambda().ge(SaleorderitemEntity::getCreatorTime, new Date(fir))
|
|
|
|
|
.le(SaleorderitemEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -262,7 +267,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
|
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
|
saleorderitemPagination.setSidx(value);
|
|
|
|
|
// saleorderitemQueryWrapper="asc".equals(saleorderitemPagination.getSort().toLowerCase())?saleorderitemQueryWrapper.orderByAsc(value):saleorderitemQueryWrapper.orderByDesc(value);
|
|
|
|
|
saleorderitemQueryWrapper="asc".equals(saleorderitemPagination.getSort().toLowerCase())?saleorderitemQueryWrapper.orderByAsc(value):saleorderitemQueryWrapper.orderByDesc(value);
|
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
@ -275,7 +280,11 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
|
|
|
|
|
String deId = firstElement.flatMap(list1 -> firstElement.filter(Objects::nonNull))
|
|
|
|
|
.map(SaleorderitemEntity::getDepartmentId)
|
|
|
|
|
.orElse(null);
|
|
|
|
|
saleorderitemPagination.setDepartmentId(deId);
|
|
|
|
|
if (deId==null){
|
|
|
|
|
saleorderitemPagination.setDepartmentId(detpartment);
|
|
|
|
|
}else {
|
|
|
|
|
saleorderitemPagination.setDepartmentId(deId);
|
|
|
|
|
}
|
|
|
|
|
IPage<SaleorderitemEntity> userIPage=saleorderitemMapper.querySalesOrder(page, saleorderitemPagination);
|
|
|
|
|
return saleorderitemPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
|
}
|
|
|
|
|