1.预配盘摆放报工、确认相关功能

master
董哲奇 2 months ago
parent c51a7de2df
commit 06de0211a8

@ -49,6 +49,10 @@ public class DmYppyz extends Model<DmYppyz> {
@TableField(exist = false) @TableField(exist = false)
private List<DmYdjhLj> ljList; private List<DmYdjhLj> ljList;
public void (String name){
this.status=StatusEnum.valueOf(name);
}
public static StatusEnum (){ public static StatusEnum (){
return StatusEnum.; return StatusEnum.;
} }

@ -25,9 +25,9 @@ public class DmYppyzController {
private final DmYppyzService service; private final DmYppyzService service;
@PostMapping("bgList") @PostMapping("wbfList")
public ResultBean<?> bgList(@RequestBody DmYppyz entity){ public ResultBean<?> wbfList(@RequestBody DmYppyz entity){
List<DmYppyz> list = service.bgList(entity); List<DmYppyz> list = service.wbfList(entity);
return new ResultBean<>(list); return new ResultBean<>(list);
} }

@ -13,6 +13,7 @@ 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;
@ -30,6 +31,7 @@ import com.dsic.gj_erp.wsclient.Message;
import com.dsic.gj_erp.wsclient.WebSocketService; import com.dsic.gj_erp.wsclient.WebSocketService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -60,14 +62,39 @@ public class ZyjhController {
private final MpDhsjServcie mpDhsjServcie; private final MpDhsjServcie mpDhsjServcie;
private final TransactionTemplate transactionTemplate;
@PostMapping("yppbg")
public ResultBean<?> yppbg(@RequestBody List<PPBGongDto> list){
List<DmYdjhLj> updateList=new ArrayList<>();
list.forEach(item->{
transactionTemplate.execute((status)->{
zyjhService.ppbg(item.getId());
if (item.getLjList()!=null){
item.getLjList().forEach(lj->{
DmYdjhLj dmYdjhLj = new DmYdjhLj();
dmYdjhLj.setId(lj.getId());
dmYdjhLj.setPpzt("03");
updateList.add(dmYdjhLj);
});
}
zyjhService.ppBGong(updateList,null,null,null);
return true;
});
});
return new ResultBean<>();
}
/** /**
* *
* ,, * ,,
*/ */
@PostMapping("wzxjc") @PostMapping("wzxjc")
public ResultBean<?> wzxjc(@RequestBody DmYdjhLj lj){ public ResultBean<?> wzxjc(@RequestBody DmYppyz yppyz){
List<DmYppyz> ybf = zyjhService.getYbf(yppyz);
return new ResultBean<>(); return new ResultBean<>(ybf);
} }
/** /**
@ -79,7 +106,7 @@ public class ZyjhController {
if (ObjUtil.isNotEmpty(dto.getLjList())){ if (ObjUtil.isNotEmpty(dto.getLjList())){
List<DmYdjhLj> list=dto.getLjList(); List<DmYdjhLj> list=dto.getLjList();
zyjhService.ppBGong(list,dto.getDcCh(),dto.getDcPl(),dto.getZyq()); zyjhService.ppBGong(list,dto.getDcCh(),dto.getDcPl(),dto.getZyq());
zyjhService.ppwc(dto.getId(),dto.getDcCh(),dto.getDcPl()); zyjhService.ppwc(dto.getId(),dto.getDcCh(),dto.getDcPl(),dto.getDcFd());
} }
}); });
return new ResultBean<>(); return new ResultBean<>();

@ -12,6 +12,7 @@ public class PPBGongDto {
Integer id; Integer id;
String dcCh; String dcCh;
String dcPl; String dcPl;
String dcFd;
String zyq; String zyq;
List<DmYdjhLj> ljList; List<DmYdjhLj> ljList;
} }

@ -9,4 +9,6 @@ import java.util.List;
@Mapper @Mapper
public interface DmYppyzMapper extends BaseMapper<DmYppyz> { public interface DmYppyzMapper extends BaseMapper<DmYppyz> {
List<DmYppyz> bgList(DmYppyz entity); List<DmYppyz> bgList(DmYppyz entity);
List<DmYppyz> wbfList(DmYppyz entity);
} }

@ -13,4 +13,8 @@ public class DmYppyzService extends ServiceImpl<DmYppyzMapper, DmYppyz> {
public List<DmYppyz> bgList(DmYppyz entity) { public List<DmYppyz> bgList(DmYppyz entity) {
return baseMapper.bgList(entity); return baseMapper.bgList(entity);
} }
public List<DmYppyz> wbfList(DmYppyz entity) {
return baseMapper.wbfList(entity);
}
} }

@ -43,10 +43,19 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
private static final String MPDHSJ_KEY="MPDHSJ"; private static final String MPDHSJ_KEY="MPDHSJ";
public void ppwc(Integer id,String dcCh,String dcPl){ public void ppbg(Integer id){
yppyzService.update(new UpdateWrapper<DmYppyz>().set("status","已配送").eq("id",id));
}
public List<DmYppyz> getYbf(DmYppyz yppyz) {
return yppyzService.bgList(yppyz);
}
public void ppwc(Integer id,String dcCh,String dcPl,String dcFd){
int count = ljService.count(Wrappers.<DmYdjhLj>lambdaQuery() int count = ljService.count(Wrappers.<DmYdjhLj>lambdaQuery()
.eq(DmYdjhLj::getCzbh, dcCh) .eq(DmYdjhLj::getCzbh, dcCh)
.eq(DmYdjhLj::getPl, dcPl) .eq(DmYdjhLj::getPl, dcPl)
.eq(DmYdjhLj::getFd, dcFd)
.isNull(DmYdjhLj::getQq) .isNull(DmYdjhLj::getQq)
.isNull(DmYdjhLj::getDw) .isNull(DmYdjhLj::getDw)
); );

@ -7,11 +7,12 @@
<result column="dwxx_id" property="dwxxId" /> <result column="dwxx_id" property="dwxxId" />
<result column="dc_ch" property="dcCh" /> <result column="dc_ch" property="dcCh" />
<result column="dc_pl" property="dcPl" /> <result column="dc_pl" property="dcPl" />
<result column="dc_fd" property="dcFd" />
<collection property="ljList" ofType="dmYdjhLj" columnPrefix="lj_"> <collection property="ljList" ofType="dmYdjhLj" columnPrefix="lj_">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="czbh" property="czbh" /> <result column="czbh" property="czbh" />
<result column="pl" property="pl" /> <result column="pl" property="pl" />
<result column="pl" property="pl" /> <result column="fd" property="fd" />
<result column="tlth" property="tlth" /> <result column="tlth" property="tlth" />
<result column="ljbh" property="ljbh" /> <result column="ljbh" property="ljbh" />
<result column="qq" property="qq" /> <result column="qq" property="qq" />
@ -21,13 +22,37 @@
<select id="bgList" resultMap="bgListResult"> <select id="bgList" resultMap="bgListResult">
select select
a.id,a.dwxx_id,a.dc_ch,a.dc_pl, a.id,a.dwxx_id,a.dc_ch,a.dc_pl,a.dc_fd,
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 c.id lj_id,c.czbh lj_czbh,c.pl lj_pl,c.fd lj_fd,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.dc_fd =c.fd
and a.status='已摆放' and b.zt>=62
<if test="dcCh!=null and dcCh!=''">
and a.dc_ch=#{dcCh}
</if>
<if test="dcPl!=null and dcPl!=''">
and a.dc_pl=#{dcPl}
</if>
<if test="dcFd!=null and dcFd!=''">
and a.dc_fd=#{dcFd}
</if>
order by a.dc_ch,a.dc_pl
</select>
<select id="wbfList" resultMap="bgListResult">
select
a.id,a.dwxx_id,a.dc_ch,a.dc_pl,a.dc_fd,
c.id lj_id,c.czbh lj_czbh,c.pl lj_pl,c.fd lj_fd,c.tlth lj_tlth,c.ljbh lj_ljbh,c.qq lj_qq,c.dw lj_dw
from from
dm_yppyz a, 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 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 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} a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.dc_fd =c.fd
and a.status='设置垛位' and b.zt>=62
and b.zyq1=#{zyq} and a.dc_ch=#{dcCh}
and isnull(c.qq,'')='' and isnull(c.dw,'')='' and isnull(c.qq,'')='' and isnull(c.dw,'')=''
order by a.dc_ch,a.dc_pl order by a.dc_ch,a.dc_pl
</select> </select>

Loading…
Cancel
Save