1.预配盘摆放相关功能

master
董哲奇 2 months ago
parent 5ba6a77690
commit c51a7de2df

@ -2,12 +2,16 @@ package com.dsic.gj_erp.bean.zyjh;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.dsic.gj_erp.bean.jhgk.DmYdjh; import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjhLj;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.util.List;
@Getter @Getter
@Setter @Setter
public class DmYppyz extends Model<DmYppyz> { public class DmYppyz extends Model<DmYppyz> {
@ -39,6 +43,12 @@ public class DmYppyz extends Model<DmYppyz> {
private StatusEnum status=StatusEnum.; private StatusEnum status=StatusEnum.;
@TableField(exist = false)
private String zyq;
@TableField(exist = false)
private List<DmYdjhLj> ljList;
public static StatusEnum (){ public static StatusEnum (){
return StatusEnum.; return StatusEnum.;
} }
@ -51,6 +61,6 @@ public class DmYppyz extends Model<DmYppyz> {
} }
public enum StatusEnum{ public enum StatusEnum{
,, ,,,,
} }
} }

@ -1,6 +1,7 @@
package com.dsic.gj_erp.controller.zyjh; package com.dsic.gj_erp.controller.zyjh;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsic.gj_erp.bean.ResultBean; import com.dsic.gj_erp.bean.ResultBean;
@ -24,6 +25,12 @@ public class DmYppyzController {
private final DmYppyzService service; private final DmYppyzService service;
@PostMapping("bgList")
public ResultBean<?> bgList(@RequestBody DmYppyz entity){
List<DmYppyz> list = service.bgList(entity);
return new ResultBean<>(list);
}
@PostMapping("submit") @PostMapping("submit")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResultBean<?> list(@RequestBody Map<String,List<DmYppyz>> map){ public ResultBean<?> list(@RequestBody Map<String,List<DmYppyz>> map){
@ -45,9 +52,13 @@ public class DmYppyzController {
@PostMapping("list") @PostMapping("list")
public ResultBean<?> list(@RequestBody DmYppyz entity){ public ResultBean<?> list(@RequestBody DmYppyz entity){
if (entity.getStatus()==DmYppyz.StatusEnum.){
entity.setStatus(null);
}
List<DmYppyz> list = service.list(Wrappers.<DmYppyz>lambdaQuery() List<DmYppyz> list = service.list(Wrappers.<DmYppyz>lambdaQuery()
.eq(StrUtil.isNotEmpty(entity.getDcCh()), DmYppyz::getDcCh, entity.getDcCh()) .eq(StrUtil.isNotEmpty(entity.getDcCh()), DmYppyz::getDcCh, entity.getDcCh())
.eq(StrUtil.isNotEmpty(entity.getDcPl()), DmYppyz::getDcPl, entity.getDcPl()) .eq(StrUtil.isNotEmpty(entity.getDcPl()), DmYppyz::getDcPl, entity.getDcPl())
.eq(ObjUtil.isNotEmpty(entity.getStatus()),DmYppyz::getStatus, entity.getStatus())
); );
return new ResultBean<>(list); return new ResultBean<>(list);
} }

@ -13,11 +13,11 @@ import com.dsic.gj_erp.bean.czzj.MpDhsj;
import com.dsic.gj_erp.bean.jhgk.DmYdjh; import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjhLj; import com.dsic.gj_erp.bean.jhgk.DmYdjhLj;
import com.dsic.gj_erp.bean.kc.ImCkwpkwp; import com.dsic.gj_erp.bean.kc.ImCkwpkwp;
import com.dsic.gj_erp.bean.zyjh.DmYppyz;
import com.dsic.gj_erp.bean.zyjh.PwExcel; import com.dsic.gj_erp.bean.zyjh.PwExcel;
import com.dsic.gj_erp.bean.zyjh.Ycldw; import com.dsic.gj_erp.bean.zyjh.Ycldw;
import com.dsic.gj_erp.bean.zyjh.YcldwInfo; import com.dsic.gj_erp.bean.zyjh.YcldwInfo;
import com.dsic.gj_erp.controller.zyjh.dto.*; import com.dsic.gj_erp.controller.zyjh.dto.*;
import com.dsic.gj_erp.dao.zyjh.PPBGongDto;
import com.dsic.gj_erp.exception.ServiceException; import com.dsic.gj_erp.exception.ServiceException;
import com.dsic.gj_erp.listeners.ExcelPwListener; import com.dsic.gj_erp.listeners.ExcelPwListener;
import com.dsic.gj_erp.service.czzj.MpDhsjServcie; import com.dsic.gj_erp.service.czzj.MpDhsjServcie;
@ -61,16 +61,30 @@ public class ZyjhController {
private final MpDhsjServcie mpDhsjServcie; private final MpDhsjServcie mpDhsjServcie;
/** /**
* *
* @param list * ,,
* @return
*/ */
@PostMapping("ljbf") @PostMapping("wzxjc")
public ResultBean<?> ljbf(@RequestBody List<DmYdjhLj> list){ public ResultBean<?> wzxjc(@RequestBody DmYdjhLj lj){
return new ResultBean<>(); return new ResultBean<>();
} }
/**
* ,
*/
@PostMapping("ppBGong")
public ResultBean<?> ppBGong(@RequestBody List<PPBGongDto> ppbGongDtoList){
ppbGongDtoList.forEach(dto->{
if (ObjUtil.isNotEmpty(dto.getLjList())){
List<DmYdjhLj> list=dto.getLjList();
zyjhService.ppBGong(list,dto.getDcCh(),dto.getDcPl(),dto.getZyq());
zyjhService.ppwc(dto.getId(),dto.getDcCh(),dto.getDcPl());
}
});
return new ResultBean<>();
}
@GetMapping("getBzryByBz") @GetMapping("getBzryByBz")
public ResultBean<?> getBzryByBz(String zyq, String zt){ public ResultBean<?> getBzryByBz(String zyq, String zt){
return new ResultBean<>(zyjhService.getBzryByBz(zyq,zt)); return new ResultBean<>(zyjhService.getBzryByBz(zyq,zt));
@ -179,7 +193,7 @@ public class ZyjhController {
*/ */
@GetMapping("getYdjhByZtOrForeman") @GetMapping("getYdjhByZtOrForeman")
public ResultBean<?> getYdjhByZtOrForeman(Integer zt,String foreman,String zyq,String userCode){ public ResultBean<?> getYdjhByZtOrForeman(Integer zt,String foreman,String zyq,String userCode){
List<DmYdjh> list = zyjhService.getYdjhByZtOrForeman(zt, foreman,userCode,zyq); List<DmYdjh> list = zyjhService.getYdjhByZtOrForeman(zt,zyq);
return new ResultBean<>(list); return new ResultBean<>(list);
} }
@ -362,6 +376,7 @@ public class ZyjhController {
throw new ServiceException(10001,"执行失败"); throw new ServiceException(10001,"执行失败");
} }
} }
@PostMapping("zxweb") @PostMapping("zxweb")
@AuthFunction @AuthFunction
public ResultBean<?> zxweb(@RequestBody PgDto dto,HttpServletRequest request) { public ResultBean<?> zxweb(@RequestBody PgDto dto,HttpServletRequest request) {

@ -0,0 +1,17 @@
package com.dsic.gj_erp.dao.zyjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjhLj;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class PPBGongDto {
Integer id;
String dcCh;
String dcPl;
String zyq;
List<DmYdjhLj> ljList;
}

@ -22,6 +22,8 @@ import java.util.Map;
*/ */
public interface DmYdjhMapper extends BaseMapper<DmYdjh> { public interface DmYdjhMapper extends BaseMapper<DmYdjh> {
List<DmYdjh> getWithDjh(Integer zt,String zyq);
List<Object> getWppljAndPpyz(String zyq1); List<Object> getWppljAndPpyz(String zyq1);
List<DmYdjh> tqYppyzFromYdjh(DmYdjh dmYdjh); List<DmYdjh> tqYppyzFromYdjh(DmYdjh dmYdjh);

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsic.gj_erp.bean.zyjh.DmYppyz; import com.dsic.gj_erp.bean.zyjh.DmYppyz;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
public interface DmYppyzMapper extends BaseMapper<DmYppyz> { public interface DmYppyzMapper extends BaseMapper<DmYppyz> {
List<DmYppyz> bgList(DmYppyz entity);
} }

@ -34,7 +34,7 @@ public class XiaoChiService{
* ,使, * ,使,
* *
*/ */
@PostConstruct // @PostConstruct
public void handler(){ public void handler(){
List<XiaochiUser> users = new XiaochiUser().selectAll(); List<XiaochiUser> users = new XiaochiUser().selectAll();
List<Device> devices=new Device().selectAll(); List<Device> devices=new Device().selectAll();

@ -5,6 +5,12 @@ import com.dsic.gj_erp.bean.zyjh.DmYppyz;
import com.dsic.gj_erp.mapper.zyjh.DmYppyzMapper; import com.dsic.gj_erp.mapper.zyjh.DmYppyzMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
@Service @Service
public class DmYppyzService extends ServiceImpl<DmYppyzMapper, DmYppyz> { public class DmYppyzService extends ServiceImpl<DmYppyzMapper, DmYppyz> {
public List<DmYppyz> bgList(DmYppyz entity) {
return baseMapper.bgList(entity);
}
} }

@ -6,14 +6,17 @@ import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsic.gj_erp.bean.jcsj.DmBzry; import com.dsic.gj_erp.bean.jcsj.DmBzry;
import com.dsic.gj_erp.bean.jcsj.DmCbxxp; import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
import com.dsic.gj_erp.bean.jhgk.DmYdjh; import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjhLj; import com.dsic.gj_erp.bean.jhgk.DmYdjhLj;
import com.dsic.gj_erp.bean.zyjh.DmYppyz;
import com.dsic.gj_erp.controller.zyjh.dto.PgWithPcDto; import com.dsic.gj_erp.controller.zyjh.dto.PgWithPcDto;
import com.dsic.gj_erp.controller.zyjh.dto.ShangLiao; import com.dsic.gj_erp.controller.zyjh.dto.ShangLiao;
import com.dsic.gj_erp.dao.zyjh.PPBGongDto;
import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper; import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
import com.dsic.gj_erp.service.jcsj.DmBzryService; import com.dsic.gj_erp.service.jcsj.DmBzryService;
import com.dsic.gj_erp.service.jcsj.DmCbxxpService; import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
@ -36,9 +39,26 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
private final DmCbxxpService dmCbxxpService; private final DmCbxxpService dmCbxxpService;
private final RedisTemplate<String,Object> redisTemplate; private final RedisTemplate<String,Object> redisTemplate;
private final DmYdjhLjService ljService; private final DmYdjhLjService ljService;
private final DmYppyzService yppyzService;
private static final String MPDHSJ_KEY="MPDHSJ"; private static final String MPDHSJ_KEY="MPDHSJ";
public void ppwc(Integer id,String dcCh,String dcPl){
int count = ljService.count(Wrappers.<DmYdjhLj>lambdaQuery()
.eq(DmYdjhLj::getCzbh, dcCh)
.eq(DmYdjhLj::getPl, dcPl)
.isNull(DmYdjhLj::getQq)
.isNull(DmYdjhLj::getDw)
);
if (count==0){
yppyzService.update(new UpdateWrapper<DmYppyz>().set("status","已摆放").eq("id",id));
}
}
public void ppBGong(List<DmYdjhLj> list,String dcCh,String dcPl,String zyq){
ljService.updateBatchById(list);
}
/** /**
* *
*/ */
@ -60,8 +80,17 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
return date+StrUtil.padPre(increment+"",3,"0"); return date+StrUtil.padPre(increment+"",3,"0");
} }
public String getMpDhsjDhh(String date){
Object xh = redisTemplate.opsForHash().get(MPDHSJ_KEY, date);
if(ObjUtil.isEmpty(xh)){
redisTemplate.opsForHash().put(MPDHSJ_KEY, date,0);
}
Long increment = redisTemplate.opsForHash().increment(MPDHSJ_KEY, date, 1);
return date+StrUtil.padPre(increment+"",3,"0");
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public List<DmYdjhLj> createLj(String dcCh, String dcPl, String tzbh){ public List<DmYdjhLj> createLj1(String dcCh, String dcPl, String tzbh){
ljService.remove(Wrappers.<DmYdjhLj>lambdaQuery() ljService.remove(Wrappers.<DmYdjhLj>lambdaQuery()
.eq(DmYdjhLj::getCzbh,dcCh) .eq(DmYdjhLj::getCzbh,dcCh)
.eq(DmYdjhLj::getPl,dcPl) .eq(DmYdjhLj::getPl,dcPl)
@ -72,7 +101,21 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
return ljInfo; return ljInfo;
} }
@Transactional(rollbackFor = Exception.class)
public List<DmYdjhLj> createLj(String dcCh, String dcPl, String tzbh){
ljService.remove(Wrappers.<DmYdjhLj>lambdaQuery()
.eq(DmYdjhLj::getCzbh,dcCh)
.eq(DmYdjhLj::getPl,dcPl)
.eq(DmYdjhLj::getTlth,tzbh)
);
List<DmYdjhLj> ljInfo = baseMapper.getLjInfo(dcCh, dcPl, tzbh);
ljService.saveBatch(ljInfo);
return ljInfo;
}
public List<DmYdjh> getYdjhByZtOrForeman(Integer zt,String zyq){
return baseMapper.getWithDjh(zt,zyq);
}
public List<DmYdjh> getYdjhByZtOrForeman(Integer zt,String foreman,String userCode,String zyq){ public List<DmYdjh> getYdjhByZtOrForeman(Integer zt,String foreman,String userCode,String zyq){
QueryWrapper<DmYdjh> wrapper = new QueryWrapper<DmYdjh>() QueryWrapper<DmYdjh> wrapper = new QueryWrapper<DmYdjh>()
@ -98,6 +141,7 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
break; break;
} }
wrapper.orderByDesc("dc_ch","dc_pl,tzbh"); wrapper.orderByDesc("dc_ch","dc_pl,tzbh");
return list(wrapper); return list(wrapper);
} }

@ -1180,6 +1180,40 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
a.status='设置垛位' and b.ppzt='01' and c.zyq1=#{zyq1} a.status='设置垛位' and b.ppzt='01' and c.zyq1=#{zyq1}
</select> </select>
<select id="getWithDjh" resultType="com.dsic.gj_erp.bean.jhgk.DmYdjh">
select
b.print_id as djh,
a.id,a.dc_ch,a.dc_ch1,a.dc_pl,a.LQLB,a.tzbh,a.wpgg,a.wpxh,a.hxcd,a.qgcd,a.qbs,a.pklx,a.pkcd,a.ljsl,a.zl,a.lx,a.xcms,
a.kw,a.slrq,a.slry,a.pw,a.pwry,a.pwrq,a.hxsb,a.hxry,a.hxrq,a.qgsb,a.qgry,a.qgrq,a.dmcd,a.dmsb,a.dmry,a.dmrq,a.pwsb,
a.pksb,a.pkry,a.pkrq,a.DC_FD,a.gjjs_dz,a.gjjs_xz,a.jsq_tlt,a.jsq_lqb,a.dhqd,a.order_bs,a.arrival_bs,a.qy,a.jzbs,a.jzsb,
a.jzry,a.qjgsb,a.qjgry,a.qjgrq,a.dcCh2,a.gjks,a.gxsj,a.hxkc_cd,a.qgkc_cd,a.jssj,a.jzrq,a.zt,a.xcgs,a.bclqzl,a.bcshzl,
a.bcylzl,a.bcljtlzl,a.bcqpyld,a.ylbs,a.plxh,a.ylbhgg,a.parent_id,a.db,a.cx,a.txc,a.jhlx,a.jssj_old,a.sczt,a.slxzxqrq,
a.sldzxqrq,a.ckbzrq,a.ckbzry,a.bmbzrq,a.bmbzry,a.bmxgry,a.bmxgrq,a.slkcdw,a.slcs,a.slxhth,a.slhth,a.slwlh,a.kcch,a.slkcxx,
a.slycldw,a.slyclcs,a.nbsbm,a.sllsh,a.sldrry,a.sldrrq,a.sllph,a.slpgry,a.slfkry,a.slfkrq,a.slbz,a.pwxcldw,a.pwcs,a.pwpgry,
a.slpgrq,a.pwpgrq,a.pwfkry,a.pwfkrq,a.pwbz,a.lldw,a.llcs,a.llpgry,a.llpgrq,a.llry,a.llfkry,a.llfkrq,a.llbz,a.hxdw,a.hxcs,
a.hxpgry,a.hxpgrq,a.hxfkrq,a.hxfkry,a.hxjybs,a.hxjych,a.hxjypl,a.hxjyfd,a.hxjyzl,a.hxjykw,a.hxjytlth,a.hxbz,a.qgdw,a.qgcs,
a.qgpgry,a.qgpgrq,a.qgfkrq,a.qgfkry,a.qgjybs,a.qgjych,a.qgjypl,a.qgjyfd,a.qgjyzl,a.qgjykw,a.qgjytlth,a.qgbz,a.qjgbs,a.pkbs,
a.ycbs,a.hxjhrq,a.qgjhrq,a.zcljhrq,a.sljhrq,a.pwjhrq,a.lljhrq,a.kcbs,a.lphqrry,a.lphqrrq,a.zyq,a.zyq1,a.ykw,a.kwmc,a.zylx
from
dm_ydjh a left join dm_tlt_print_wh b on a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.tzbh=b.dc_tlt
<where>
zt>=#{zt} and zt>11
<if test="zyq!='' and zyq!=null">
and zyq1=#{zyq}
</if>
<if test="zt==31">
and isnull(pwfkry,'')=''
</if>
<if test="zt==51">
and isnull(hxfkry,'')=''
</if>
<if test="zt==61">
and isnull(qgfkry,'')=''
</if>
</where>
order by a.dc_ch,a.dc_pl,a.tzbh
</select>
<update id="xzylbs" parameterType="string" > <update id="xzylbs" parameterType="string" >
UPDATE dm_ydjh set dm_ydjh.ylbs=dm_bchxylp.sfyl UPDATE dm_ydjh set dm_ydjh.ylbs=dm_bchxylp.sfyl

@ -529,7 +529,6 @@
dm_ydjh_lj.tz, dm_ydjh_lj.tz,
dm_ydjh_lj.lx, dm_ydjh_lj.lx,
dm_ydjh_lj.xj, dm_ydjh_lj.xj,
dm_ydjh.slfkry, dm_ydjh.slfkry,
dm_ydjh.slfkrq, dm_ydjh.slfkrq,
dm_ydjh.pwfkry, dm_ydjh.pwfkry,
@ -566,14 +565,12 @@
dm_qfxq.xqzt, dm_qfxq.xqzt,
dm_qfxq.dzglxq, dm_qfxq.dzglxq,
dm_qfxq.dzglxq_old dm_qfxq.dzglxq_old
FROM FROM
dm_ydjh_lj LEFT JOIN dm_ydjh on dm_ydjh.dc_ch=dm_ydjh_lj.czbh and dm_ydjh.dc_pl= dm_ydjh_lj.pl and dm_ydjh.tzbh =dm_ydjh_lj.tlth dm_ydjh_lj
and LEFT JOIN dm_ydjh on dm_ydjh.dc_ch=dm_ydjh_lj.czbh and dm_ydjh.dc_pl= dm_ydjh_lj.pl and dm_ydjh.tzbh =dm_ydjh_lj.tlth
left join dm_qfxq on dm_qfxq.dc_ch = dm_ydjh_lj.czbh and dm_qfxq.dc_pl=dm_ydjh_lj.pl and dm_qfxq.dc_fd=dm_ydjh_lj.fd
dm_ydjh.dc_pl= dm_ydjh_lj.fd left join dm_qfxq on dm_qfxq.dc_ch = dm_ydjh_lj.czbh and dm_qfxq.dc_pl=dm_ydjh_lj.pl and dm_qfxq.dc_fd=dm_ydjh_lj.fd where
1=1
where 1=1
<if test=" dcch!=null and dcch!=''"> <if test=" dcch!=null and dcch!=''">
and dm_ydjh_lj.czbh=#{dcch} and dm_ydjh_lj.czbh=#{dcch}
</if> </if>
@ -583,38 +580,18 @@
<if test=" tlth!=null and tlth!=''"> <if test=" tlth!=null and tlth!=''">
and dm_ydjh_lj.tlth=#{tlth} and dm_ydjh_lj.tlth=#{tlth}
</if> </if>
<if test=" qgkw!=null and qgkw!=''"> <if test=" qgkw!=null and qgkw!=''">
and dm_ydjh_lj.kw=#{qgkw} and dm_ydjh_lj.kw=#{qgkw}
</if> </if>
<!-- <if test="zt=='01'.toString()">-->
<!-- and (isnull( dm_ydjh_lj.rkry,'')='' or isnull( dm_ydjh_lj.rkrq,'')='')-->
<!-- </if>-->
<if test=" zt!=null and zt!=''"> <if test=" zt!=null and zt!=''">
and ISNULL(dm_ydjh_lj.ppzt,'')=#{zt} and ISNULL(dm_ydjh_lj.ppzt,'')=#{zt}
</if> </if>
<if test=" dwh!=null and dwh!=''"> <if test=" dwh!=null and dwh!=''">
and dm_ydjh_lj.dw=#{dwh} and dm_ydjh_lj.dw=#{dwh}
</if> </if>
<if test=" qy!=null and qy!=''"> <if test=" qy!=null and qy!=''">
and dm_ydjh_lj.qq=#{qy} and dm_ydjh_lj.qq=#{qy}
</if> </if>
order by czbh,pl,fd order by czbh,pl,fd
</select> </select>
</mapper> </mapper>

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsic.gj_erp.mapper.zyjh.DmYppyzMapper">
<resultMap id="bgListResult" type="dmYppyz">
<id column="id" property="id"/>
<result column="dwxx_id" property="dwxxId" />
<result column="dc_ch" property="dcCh" />
<result column="dc_pl" property="dcPl" />
<collection property="ljList" ofType="dmYdjhLj" columnPrefix="lj_">
<id column="id" property="id" />
<result column="czbh" property="czbh" />
<result column="pl" property="pl" />
<result column="pl" property="pl" />
<result column="tlth" property="tlth" />
<result column="ljbh" property="ljbh" />
<result column="qq" property="qq" />
<result column="dw" property="dw" />
</collection>
</resultMap>
<select id="bgList" resultMap="bgListResult">
select
a.id,a.dwxx_id,a.dc_ch,a.dc_pl,
c.id lj_id,c.czbh lj_czbh,c.pl lj_pl,c.tlth lj_tlth,c.ljbh lj_ljbh,c.qq lj_qq,c.dw lj_dw
from
dm_yppyz a,
dm_ydjh b left join dm_ydjh_lj c on b.dc_ch=c.czbh and b.dc_pl=c.pl and b.tzbh=c.tlth
where
a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.status='设置垛位' and b.zyq1=#{zyq} and a.dc_ch=#{dcCh}
and isnull(c.qq,'')='' and isnull(c.dw,'')=''
order by a.dc_ch,a.dc_pl
</select>
</mapper>
Loading…
Cancel
Save