|
|
@ -50,6 +50,8 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
private NxPriceProductService nxPriceProductService;
|
|
|
|
private NxPriceProductService nxPriceProductService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private NxPriceRecycleService nxPriceRecycleService;
|
|
|
|
private NxPriceRecycleService nxPriceRecycleService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private NxPriceMapper nxPriceMapper;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<NxPriceEntity> getList(NxPricePagination nxPricePagination){
|
|
|
|
public List<NxPriceEntity> getList(NxPricePagination nxPricePagination){
|
|
|
|
return getTypeList(nxPricePagination,nxPricePagination.getDataType());
|
|
|
|
return getTypeList(nxPricePagination,nxPricePagination.getDataType());
|
|
|
@ -232,7 +234,31 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
String value = nxPricePagination.getPriceCode() instanceof List ?
|
|
|
|
String value = nxPricePagination.getPriceCode() instanceof List ?
|
|
|
|
JsonUtil.getObjectToString(nxPricePagination.getPriceCode()) :
|
|
|
|
JsonUtil.getObjectToString(nxPricePagination.getPriceCode()) :
|
|
|
|
String.valueOf(nxPricePagination.getPriceCode());
|
|
|
|
String.valueOf(nxPricePagination.getPriceCode());
|
|
|
|
nxPriceQueryWrapper.lambda().like(NxPriceEntity::getPriceCode,value);
|
|
|
|
// nxPriceQueryWrapper.lambda().like(NxPriceEntity::getPriceCode,value);
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.like("a.PRICE_CODE",value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(nxPricePagination.getProductName())){
|
|
|
|
|
|
|
|
nxPriceNum++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String value = nxPricePagination.getProductName() instanceof List ?
|
|
|
|
|
|
|
|
JsonUtil.getObjectToString(nxPricePagination.getProductName()) :
|
|
|
|
|
|
|
|
String.valueOf(nxPricePagination.getProductName());
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.like("c.NAME",value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(nxPricePagination.getStationName())){
|
|
|
|
|
|
|
|
nxPriceNum++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String value = nxPricePagination.getStationName() instanceof List ?
|
|
|
|
|
|
|
|
JsonUtil.getObjectToString(nxPricePagination.getStationName()) :
|
|
|
|
|
|
|
|
String.valueOf(nxPricePagination.getStationName());
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.like("e.STATION_NAME",value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -297,7 +323,7 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
if(ObjectUtil.isNotEmpty(nxPricePagination.getCreatorUserId())){
|
|
|
|
if(ObjectUtil.isNotEmpty(nxPricePagination.getCreatorUserId())){
|
|
|
|
nxPriceNum++;
|
|
|
|
nxPriceNum++;
|
|
|
|
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.lambda().eq(NxPriceEntity::getCreatorUserId,nxPricePagination.getCreatorUserId());
|
|
|
|
nxPriceQueryWrapper.eq("a.F_CREATOR_USER_ID",nxPricePagination.getCreatorUserId());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -308,9 +334,10 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
Long fir = Long.valueOf(String.valueOf(CreatorTimeList.get(0)));
|
|
|
|
Long fir = Long.valueOf(String.valueOf(CreatorTimeList.get(0)));
|
|
|
|
Long sec = Long.valueOf(String.valueOf(CreatorTimeList.get(1)));
|
|
|
|
Long sec = Long.valueOf(String.valueOf(CreatorTimeList.get(1)));
|
|
|
|
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.lambda().ge(NxPriceEntity::getCreatorTime, new Date(fir))
|
|
|
|
// nxPriceQueryWrapper.lambda().ge(NxPriceEntity::getCreatorTime, new Date(fir))
|
|
|
|
.le(NxPriceEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
nxPriceQueryWrapper.ge("a.F_CREATOR_TIME", new Date(fir))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.le("a.F_CREATOR_TIME", DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -338,7 +365,7 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
if (intersection.size()==0){
|
|
|
|
if (intersection.size()==0){
|
|
|
|
intersection.add("jnpfNullList");
|
|
|
|
intersection.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nxPriceQueryWrapper.lambda().in(NxPriceEntity::getId, intersection);
|
|
|
|
nxPriceQueryWrapper.in("a.id", intersection);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//是否有高级查询
|
|
|
|
//是否有高级查询
|
|
|
|
if (StringUtil.isNotEmpty(superOp)){
|
|
|
|
if (StringUtil.isNotEmpty(superOp)){
|
|
|
@ -346,7 +373,7 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
allSuperIDlist.add("jnpfNullList");
|
|
|
|
allSuperIDlist.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<String> finalAllSuperIDlist = allSuperIDlist;
|
|
|
|
List<String> finalAllSuperIDlist = allSuperIDlist;
|
|
|
|
nxPriceQueryWrapper.lambda().and(t->t.in(NxPriceEntity::getId, finalAllSuperIDlist));
|
|
|
|
nxPriceQueryWrapper.and(t->t.in("a.id", finalAllSuperIDlist));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//是否有数据过滤查询
|
|
|
|
//是否有数据过滤查询
|
|
|
|
if (StringUtil.isNotEmpty(ruleOp)){
|
|
|
|
if (StringUtil.isNotEmpty(ruleOp)){
|
|
|
@ -354,14 +381,16 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
allRuleIDlist.add("jnpfNullList");
|
|
|
|
allRuleIDlist.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<String> finalAllRuleIDlist = allRuleIDlist;
|
|
|
|
List<String> finalAllRuleIDlist = allRuleIDlist;
|
|
|
|
nxPriceQueryWrapper.lambda().and(t->t.in(NxPriceEntity::getId, finalAllRuleIDlist));
|
|
|
|
nxPriceQueryWrapper.and(t->t.in("a.id", finalAllRuleIDlist));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//假删除标志
|
|
|
|
//假删除标志
|
|
|
|
nxPriceQueryWrapper.lambda().isNull(NxPriceEntity::getDeleteMark);
|
|
|
|
// nxPriceQueryWrapper.lambda().isNull(NxPriceEntity::getDeleteMark);
|
|
|
|
|
|
|
|
nxPriceQueryWrapper.isNull("a.f_delete_mark");
|
|
|
|
//排序
|
|
|
|
//排序
|
|
|
|
if(StringUtil.isEmpty(nxPricePagination.getSidx())){
|
|
|
|
if(StringUtil.isEmpty(nxPricePagination.getSidx())){
|
|
|
|
nxPriceQueryWrapper.lambda().orderByDesc(NxPriceEntity::getId);
|
|
|
|
// nxPriceQueryWrapper.lambda().orderByDesc(NxPriceEntity::getId);
|
|
|
|
|
|
|
|
nxPricePagination.setSidx("a.f_creator_time");
|
|
|
|
|
|
|
|
nxPricePagination.setSort("DESC");
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String sidx = nxPricePagination.getSidx();
|
|
|
|
String sidx = nxPricePagination.getSidx();
|
|
|
@ -370,7 +399,9 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
Field declaredField = nxPriceEntity.getClass().getDeclaredField(strs[0]);
|
|
|
|
Field declaredField = nxPriceEntity.getClass().getDeclaredField(strs[0]);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
nxPriceQueryWrapper="asc".equals(nxPricePagination.getSort().toLowerCase())?nxPriceQueryWrapper.orderByAsc(value):nxPriceQueryWrapper.orderByDesc(value);
|
|
|
|
nxPricePagination.setSidx("a." + value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// nxPriceQueryWrapper="asc".equals(nxPricePagination.getSort().toLowerCase())?nxPriceQueryWrapper.orderByAsc(value):nxPriceQueryWrapper.orderByDesc(value);
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -379,7 +410,9 @@ public class NxPriceServiceImpl extends ServiceImpl<NxPriceMapper, NxPriceEntity
|
|
|
|
if("0".equals(dataType)){
|
|
|
|
if("0".equals(dataType)){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
Page<NxPriceEntity> page=new Page<>(nxPricePagination.getCurrentPage(), nxPricePagination.getPageSize());
|
|
|
|
Page<NxPriceEntity> page=new Page<>(nxPricePagination.getCurrentPage(), nxPricePagination.getPageSize());
|
|
|
|
IPage<NxPriceEntity> userIPage=this.page(page, nxPriceQueryWrapper);
|
|
|
|
// IPage<NxPriceEntity> userIPage=this.page(page, nxPriceQueryWrapper);
|
|
|
|
|
|
|
|
IPage<NxPriceEntity> userIPage = nxPriceMapper.queryByKeyword(page, nxPricePagination, nxPriceQueryWrapper);
|
|
|
|
|
|
|
|
|
|
|
|
return nxPricePagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
return nxPricePagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
List<NxPriceEntity> list = new ArrayList();
|
|
|
|
List<NxPriceEntity> list = new ArrayList();
|
|
|
|