|
@@ -396,11 +396,7 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
|
|
|
if (ObjectUtils.isEmpty(jcxx)) {
|
|
|
return ycxxList;
|
|
|
}
|
|
|
- String date = zwywJclrYcxx.getYchz();
|
|
|
- date = date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8);
|
|
|
- String startDate = date + " 00:00:00";
|
|
|
- String endDate = date + " 23:59:59";
|
|
|
- List<ZwywJclrYcxx> list = getAllYcxxByLnstGZH(startDate, endDate,zwywJclrYcxx.getStbm());
|
|
|
+ List<ZwywJclrYcxx> list = getAllYcxxByLnstGZH(zwywJclrYcxx);
|
|
|
if(StringUtils.isNotEmpty(list)){
|
|
|
ycxxList = list;
|
|
|
}
|
|
@@ -408,43 +404,38 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
|
|
|
}
|
|
|
|
|
|
public List<ZwywJclrYcxx> getYcxxByLnst(ZwywJclrYcxx zwywJclrYcxx) {
|
|
|
+
|
|
|
List<ZwywJclrYcxx> ycxxList = new ArrayList<>();
|
|
|
if(StringUtils.isEmpty(zwywJclrYcxx.getYchz())){
|
|
|
- throw new ServiceException("请选择用餐时间!");
|
|
|
+ zwywJclrYcxx.setYchz(DateUtils.getDate().replaceAll("-", ""));
|
|
|
}
|
|
|
+
|
|
|
LnstJcxx jcxx = lnstJcxxMapper.selectById(SecurityUtils.getJgId());
|
|
|
+
|
|
|
+
|
|
|
if (ObjectUtils.isEmpty(jcxx)) {
|
|
|
return ycxxList;
|
|
|
}
|
|
|
- String date = zwywJclrYcxx.getYchz();
|
|
|
- date = date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8);
|
|
|
- String startDate = date + " 00:00:00";
|
|
|
- String endDate = date + " 23:59:59";
|
|
|
- List<ZwywJclrYcxx> list = getAllYcxxByLnst(startDate, endDate,zwywJclrYcxx.getStbm());
|
|
|
+
|
|
|
+ List<ZwywJclrYcxx> list = getAllYcxxByLnst(zwywJclrYcxx);
|
|
|
if(StringUtils.isNotEmpty(list)){
|
|
|
ycxxList = list;
|
|
|
}
|
|
|
return ycxxList;
|
|
|
}
|
|
|
|
|
|
- private List<ZwywJclrYcxx> getAllYcxxByLnstGZH(String startDate, String endDate, String stbm) {
|
|
|
+ private List<ZwywJclrYcxx> getAllYcxxByLnstGZH(ZwywJclrYcxx ycParams) {
|
|
|
List<ZwywJclrYcxx> list = new ArrayList();
|
|
|
- if (StringUtils.isEmpty(startDate) && StringUtils.isEmpty(endDate)) {
|
|
|
- startDate = DateUtils.getDate();
|
|
|
- }
|
|
|
- startDate += " 00:00:00";
|
|
|
-
|
|
|
- // 这块的需要在做一个查询传入时间的用餐信息。添加进来平板或者其他信息(无流水号)。-CH-2024-7-16
|
|
|
- LambdaQueryWrapper<ZwywJclrYcxx> lqw = new LambdaQueryWrapper<ZwywJclrYcxx>()
|
|
|
- .eq(ZwywJclrYcxx::getStbm,stbm)
|
|
|
- .eq(ZwywJclrYcxx::getZt,"0")
|
|
|
- .likeRight(ZwywJclrYcxx::getYcsj, startDate.replace("-","").substring(0,8));
|
|
|
|
|
|
- ZwywJclrYcxx zwywJclrYcxx = new ZwywJclrYcxx();
|
|
|
- zwywJclrYcxx.setStbm(stbm);
|
|
|
- zwywJclrYcxx.setYcsj(startDate.replace("-","").substring(0,8));
|
|
|
+ List<ZwywJclrYcxx> dbYcxxList;
|
|
|
+ if(Integer.parseInt(ycParams.getYchz().substring(0,4))<= 2023){
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.listAndLrInfoGZHOf2023(ycParams);
|
|
|
+ } else if ("2024".equals(ycParams.getYchz().substring(0,4))){
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.listAndLrInfoGZHOf2024(ycParams);
|
|
|
+ }else{
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.listAndLrInfoGZH(ycParams);
|
|
|
+ }
|
|
|
|
|
|
- List<ZwywJclrYcxx> dbYcxxList = zwywJclrYcxxMapper.listAndLrInfoGZH(zwywJclrYcxx);
|
|
|
dbYcxxList.forEach(item->{
|
|
|
if(StringUtils.isNotEmpty(item.getSbdwbm())){
|
|
|
item.setJylx("三方接入");
|
|
@@ -477,19 +468,18 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private List<ZwywJclrYcxx> getAllYcxxByLnst(String startDate, String endDate, String stbm) {
|
|
|
+ private List<ZwywJclrYcxx> getAllYcxxByLnst(ZwywJclrYcxx ycParams) {
|
|
|
List<ZwywJclrYcxx> list = new ArrayList();
|
|
|
- if (StringUtils.isEmpty(startDate) && StringUtils.isEmpty(endDate)) {
|
|
|
- startDate = DateUtils.getDate();
|
|
|
+
|
|
|
+ List<ZwywJclrYcxx> dbYcxxList;
|
|
|
+ if(Integer.parseInt(ycParams.getYchz().substring(0,4))<= 2023){
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.seletYcxxStOf2023(ycParams);
|
|
|
+ } else if ("2024".equals(ycParams.getYchz().substring(0,4))){
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.seletYcxxStOf2024(ycParams);
|
|
|
+ }else{
|
|
|
+ dbYcxxList = zwywJclrYcxxMapper.seletYcxxSt(ycParams);
|
|
|
}
|
|
|
- startDate += " 00:00:00";
|
|
|
|
|
|
- // 这块的需要在做一个查询传入时间的用餐信息。添加进来平板或者其他信息(无流水号)。-CH-2024-7-16
|
|
|
- LambdaQueryWrapper<ZwywJclrYcxx> lqw = new LambdaQueryWrapper<ZwywJclrYcxx>()
|
|
|
- .eq(ZwywJclrYcxx::getStbm,stbm)
|
|
|
- .eq(ZwywJclrYcxx::getZt,"0")
|
|
|
- .likeRight(ZwywJclrYcxx::getYcsj, startDate.replace("-","").substring(0,8));
|
|
|
- List<ZwywJclrYcxx> dbYcxxList = zwywJclrYcxxMapper.selectList(lqw);
|
|
|
dbYcxxList.forEach(item->{
|
|
|
if(StringUtils.isNotEmpty(item.getSbdwbm())){
|
|
|
item.setJylx("三方接入");
|