1.修复预配盘前方需求数据无法按照所有船查询的bug

master
董哲奇 1 year ago
parent 73b58c3774
commit 88792abb73

@ -36,7 +36,11 @@ public class YppController {
public ResultBean<?> getQfxq(@RequestBody DmQfxq qfxq){
String existsSql="select dc_ch,dc_pl,dc_fd from dm_ppxxb ";
StringBuilder builder=new StringBuilder(existsSql);
builder.append("where dc_ch=").append("'").append(qfxq.getDcCh()).append("'");
builder.append("where 1=1");
if (StrUtil.isNotEmpty(qfxq.getDcCh())){
builder.append(" and dc_ch='").append(qfxq.getDcCh()).append("'");
}
builder.append(" and dm_qfxq.dc_ch=").append("dm_ppxxb.dc_ch");
builder.append(" and dm_qfxq.dc_pl=").append("dm_ppxxb.dc_pl");
builder.append(" and dm_qfxq.dc_fd=").append("dm_ppxxb.dc_fd");
@ -49,7 +53,7 @@ public class YppController {
builder.append(" group by dc_ch,dc_pl,dc_fd");
List<DmQfxq> list = qfxqService.list(Wrappers.<DmQfxq>lambdaQuery()
.eq(DmQfxq::getDcCh, qfxq.getDcCh())
.eq(StrUtil.isNotEmpty(qfxq.getDcCh()),DmQfxq::getDcCh, qfxq.getDcCh())
.eq(StrUtil.isNotEmpty(qfxq.getDcPl()),DmQfxq::getDcPl, qfxq.getDcPl())
.eq(StrUtil.isNotEmpty(qfxq.getDcFd()),DmQfxq::getDcFd, qfxq.getDcFd())
.eq(StrUtil.isNotEmpty(qfxq.getZt()),DmQfxq::getZt,qfxq.getZt())

Loading…
Cancel
Save