|
|
|
@ -73,32 +73,32 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
|
int total=0;
|
|
|
|
|
int poundlistNum =0;
|
|
|
|
|
int poundlistNum =0;
|
|
|
|
|
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
|
|
|
|
|
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
|
|
|
|
|
boolean pcPermission = true;
|
|
|
|
|
boolean appPermission = true;
|
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
|
if(isPc && pcPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
boolean pcPermission = true;
|
|
|
|
|
boolean appPermission = true;
|
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
|
if(isPc && pcPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!isPc && appPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
if(!isPc && appPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -109,12 +109,12 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
Long fir = Long.valueOf(PoundDateList.get(0));
|
|
|
|
|
Long sec = Long.valueOf(PoundDateList.get(1));
|
|
|
|
|
|
|
|
|
|
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
|
|
|
|
|
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
|
|
|
|
|
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
|
|
|
|
|
}
|
|
|
|
@ -211,7 +211,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
}
|
|
|
|
|
//排序
|
|
|
|
|
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
|
|
|
|
|
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
|
|
|
|
|
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
|
|
|
|
|
}else{
|
|
|
|
|
try {
|
|
|
|
|
String sidx = poundlistPagination.getSidx();
|
|
|
|
@ -225,9 +225,9 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
|
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
|
|
|
|
|
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
|
|
|
|
|
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
|
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
|
|
|
|
|
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
|
|
|
|
|
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
|
}else{
|
|
|
|
|
List<PoundlistEntity> list = new ArrayList();
|
|
|
|
|
return poundlistPagination.setData(list, list.size());
|
|
|
|
@ -237,66 +237,66 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
public List<PoundlistEntity> getTypeList(PoundlistPagination poundlistPagination,String dataType){
|
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
|
int total=0;
|
|
|
|
|
int poundlistNum =0;
|
|
|
|
|
int total=0;
|
|
|
|
|
int poundlistNum =0;
|
|
|
|
|
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
|
|
|
|
|
boolean pcPermission = true;
|
|
|
|
|
boolean appPermission = true;
|
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
|
if(isPc && pcPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
boolean pcPermission = true;
|
|
|
|
|
boolean appPermission = true;
|
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
|
if(isPc && pcPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!isPc && appPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
if(!isPc && appPermission){
|
|
|
|
|
if (!userProvider.get().getIsAdministrator()){
|
|
|
|
|
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
|
|
|
|
|
if (ObjectUtil.isEmpty(poundlistObj)){
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
} else {
|
|
|
|
|
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
List<String> PoundDateList = poundlistPagination.getPoundDate();
|
|
|
|
|
Long fir = Long.valueOf(PoundDateList.get(0));
|
|
|
|
|
Long sec = Long.valueOf(PoundDateList.get(1));
|
|
|
|
|
|
|
|
|
|
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
|
|
|
|
|
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
|
|
|
|
|
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
|
|
|
|
|
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
|
|
|
|
|
poundlistNum++;
|
|
|
|
|
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
|
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
|
|
|
|
|
}
|
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
|
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
|
|
|
|
|
}
|
|
|
|
|
//排序
|
|
|
|
|
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
|
|
|
|
|
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
|
|
|
|
|
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
|
|
|
|
|
}else{
|
|
|
|
|
try {
|
|
|
|
|
String sidx = poundlistPagination.getSidx();
|
|
|
|
|
String sidx = poundlistPagination.getSidx();
|
|
|
|
|
PoundlistEntity poundlistEntity = new PoundlistEntity();
|
|
|
|
|
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
|
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
|
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
|
|
|
|
|
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
|
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
|
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
|
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
@ -336,8 +336,8 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
|
|
|
|
|
//销售毛利表
|
|
|
|
|
@Override
|
|
|
|
|
public List<PoundlistSEntity> qureylist(PoundlistSEntity poundlistSEntity) {
|
|
|
|
|
List<PoundlistSEntity> list= poundlistMapper.qureylist(poundlistSEntity);
|
|
|
|
|
return list;
|
|
|
|
|
List<PoundlistSEntity> list= poundlistMapper.qureylist(poundlistSEntity);
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|