Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -29,6 +29,8 @@ import com.ruoyi.out.exception.domain.OutExceptionRecord;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.out.exception.service.IOutExceptionRecordService;
|
||||
import com.ruoyi.pda.domain.TrayCodeMakeSure;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -67,6 +69,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
||||
@Autowired
|
||||
private IOutExceptionRecordService outExceptionRecordService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -402,8 +406,15 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult OuthandFinish(String[] jobIds) {
|
||||
return null;
|
||||
for (String jobId : jobIds) {
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
TrayCodeMakeSure trayCodeMakeSure = new TrayCodeMakeSure();
|
||||
trayCodeMakeSure.setTrayCode(job.getTrayCode());
|
||||
pdaService.outMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -439,7 +450,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//修改货位状态
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
if (cargoSpace != null) {
|
||||
cargoSpace.setStatus("1");
|
||||
cargoSpace.setStatus("2");
|
||||
basCargoSpaceService.updateBasCargoSpace(cargoSpace);
|
||||
}
|
||||
job.setStatus("5");
|
||||
|
||||
@@ -38,7 +38,37 @@ public class OutPickSubmit extends BaseEntity
|
||||
@Excel(name = "物料数量")
|
||||
private String quantit;
|
||||
|
||||
public void setId(Long id)
|
||||
private String warehouseId;
|
||||
|
||||
private String exitId;
|
||||
|
||||
private String productName;
|
||||
|
||||
public String getWarehouseId() {
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getExitId() {
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId) {
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@@ -315,22 +315,19 @@ public class PdaController extends BaseController {
|
||||
mydoJob.setWarehouseId(basWarehouse.getWarehouseId());
|
||||
mydoJob.setCargoSpaceId(trayCodeMsg.getTrayCode());
|
||||
mydoJob.setInOut(trayCodeMsg.getInOut());
|
||||
if("1".equals(trayCodeMsg.getInOut())){
|
||||
mydoJob.setStatus("1");
|
||||
}else{
|
||||
mydoJob.setStatus("3");
|
||||
}
|
||||
|
||||
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(mydoJob);
|
||||
//将mydoJob添加进mydoJobArrayList
|
||||
mydoJobArrayList.addAll(mydoJobs);
|
||||
|
||||
}
|
||||
//ctu库
|
||||
if("2".equals(basWarehouse.getWarehouseType()) && !"1".equals(trayCodeMsg.getInOut())){
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setInOut("2");
|
||||
if("4".equals(trayCodeMsg.getInOut())){
|
||||
mydoJob.setInOut("4");
|
||||
}else{
|
||||
mydoJob.setInOut("2");
|
||||
}
|
||||
|
||||
mydoJob.setWarehouseId(basWarehouse.getWarehouseId());
|
||||
mydoJob.setCargoSpaceId(trayCodeMsg.getTrayCode());
|
||||
mydoJob.setStatus("3");
|
||||
@@ -338,7 +335,6 @@ public class PdaController extends BaseController {
|
||||
mydoJobArrayList.addAll(mydoJobs2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -433,5 +429,14 @@ public class PdaController extends BaseController {
|
||||
public AjaxResult getAisleStatisticsData(@RequestParam("warehouseId") String warehouseId){
|
||||
return success(pdaService.getAisleStatisticsData(warehouseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定料架
|
||||
*/
|
||||
@RequestMapping("/bindShelf")
|
||||
@ResponseBody
|
||||
public AjaxResult bindShelf(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
return pdaService.bindShelf(trayCodeMakeSure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ public class TrayCodeMakeSure {
|
||||
private String trayCode;
|
||||
//容器码
|
||||
private String containerCode;
|
||||
|
||||
private String warehouseId;
|
||||
|
||||
private String exitId;
|
||||
//拣选列表
|
||||
private List<MydoJobDetail> mydoJobDetailList;
|
||||
}
|
||||
|
||||
@@ -42,4 +42,6 @@ public interface PdaService {
|
||||
Map<String,Object> getAisleStatisticsData(String warehouseId);
|
||||
|
||||
AjaxResult bindContainer(TrayCodeMakeSure trayCodeMakeSure);
|
||||
|
||||
AjaxResult bindShelf(TrayCodeMakeSure trayCodeMakeSure);
|
||||
}
|
||||
|
||||
@@ -227,17 +227,24 @@ public class PdaServiceImp implements PdaService {
|
||||
//判断任务是否存在
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
mydoJobParam.setStatus("3");
|
||||
List<MydoJob> mydoJobList = mydoJobService.selectMydoJobList(mydoJobParam);
|
||||
if (CollUtil.isEmpty(mydoJobList)) {
|
||||
return AjaxResult.warn("任务不存在");
|
||||
}
|
||||
|
||||
|
||||
|
||||
MydoJobDetail mydoJobDetailParam = new MydoJobDetail();
|
||||
mydoJobDetailParam.setJobId(mydoJobList.get(0).getJobId());
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetailParam);
|
||||
if (CollUtil.isEmpty(mydoJobDetails)) {
|
||||
return AjaxResult.warn("子任务不存在");
|
||||
}
|
||||
//空托盘空料箱
|
||||
if("21".equals(mydoJobList.get(0).getInOrOut()) || "22".equals(mydoJobList.get(0).getInOrOut())){
|
||||
return handleOutType2(trayCodeMakeSure, mydoJobDetails, mydoJobList.get(0));
|
||||
}
|
||||
|
||||
//获取单据类型
|
||||
OutStockout outStockoutParam = new OutStockout();
|
||||
@@ -339,7 +346,8 @@ public class PdaServiceImp implements PdaService {
|
||||
OutPickSubmit outPickSubmitParam = new OutPickSubmit();
|
||||
//outPickSubmitParam.setJobId(mydoJob.getJobId());
|
||||
//outPickSubmitParam.setJobDetailId(mydoJobDetail.getJobDetailId());
|
||||
outPickSubmitParam.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
outPickSubmitParam.setWarehouseId(mydoJob.getWarehouseId());
|
||||
outPickSubmitParam.setExitId(mydoJob.getExitId());
|
||||
List<OutPickSubmit> outPickSubmits = outPickSubmitService.selectOutPickSubmitList(outPickSubmitParam);
|
||||
if (outPickSubmits.isEmpty()) {
|
||||
//存入中间表
|
||||
@@ -349,6 +357,8 @@ public class PdaServiceImp implements PdaService {
|
||||
outPickSubmit.setProductId(mydoJobDetail.getProductId());
|
||||
outPickSubmit.setQuantit(mydoJobDetail.getOutQuantity());
|
||||
outPickSubmit.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
outPickSubmit.setWarehouseId(mydoJob.getWarehouseId());
|
||||
outPickSubmit.setExitId(mydoJob.getExitId());
|
||||
outPickSubmitService.insertOutPickSubmit(outPickSubmit);
|
||||
} else {
|
||||
OutPickSubmit oldOutPickSubmit = outPickSubmits.get(0);
|
||||
@@ -677,4 +687,42 @@ public class PdaServiceImp implements PdaService {
|
||||
return AjaxResult.success("绑定成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult bindShelf(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
BasContainerDetails basContainerDetails = new BasContainerDetails();
|
||||
basContainerDetails.setContainerId(trayCodeMakeSure.getContainerCode());
|
||||
for(MydoJobDetail mydoJobDetail:trayCodeMakeSure.getMydoJobDetailList()){
|
||||
basContainerDetails.setProductId(mydoJobDetail.getProductId());
|
||||
List<BasContainerDetails> basContainerDetailsList = basContainerDetailsService.selectBasContainerDetailsList(basContainerDetails);
|
||||
if(basContainerDetailsList.size()==0){
|
||||
basContainerDetails.setProductName(mydoJobDetail.getExtraField().getMaterialDesc());
|
||||
basContainerDetails.setQuantity(Convert.toLong(mydoJobDetail.getPickBindQuantity()));
|
||||
basContainerDetailsService.insertBasContainerDetails(basContainerDetails);
|
||||
}else{
|
||||
basContainerDetails.setId(basContainerDetailsList.get(0).getId());
|
||||
basContainerDetails.setQuantity(basContainerDetailsList.get(0).getQuantity()+Convert.toLong(mydoJobDetail.getPickBindQuantity()));
|
||||
basContainerDetailsService.updateBasContainerDetails(basContainerDetails);
|
||||
}
|
||||
|
||||
|
||||
OutPickSubmit outPickSubmitParam = new OutPickSubmit();
|
||||
outPickSubmitParam.setWarehouseId(trayCodeMakeSure.getWarehouseId());
|
||||
outPickSubmitParam.setExitId(trayCodeMakeSure.getExitId());
|
||||
outPickSubmitParam.setProductId(mydoJobDetail.getProductId());
|
||||
List<OutPickSubmit> outPickSubmits = outPickSubmitService.selectOutPickSubmitList(outPickSubmitParam);
|
||||
if( Integer.parseInt(outPickSubmits.get(0).getQuantit()) > Integer.parseInt(mydoJobDetail.getPickBindQuantity()) ){
|
||||
outPickSubmitParam.setQuantit( String.valueOf(Integer.parseInt(outPickSubmits.get(0).getQuantit()) - Integer.parseInt(mydoJobDetail.getPickBindQuantity())));
|
||||
outPickSubmitParam.setId(outPickSubmits.get(0).getId());
|
||||
outPickSubmitService.updateOutPickSubmit(outPickSubmitParam);
|
||||
}else{
|
||||
outPickSubmitService.deleteOutPickSubmitById(outPickSubmits.get(0).getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return AjaxResult.success("绑定成功!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 and mj.in_or_out not in(25,26)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 and mj.in_or_out not in(5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test = "inOutIds !=null and inOutIds.size() > 0">
|
||||
|
||||
@@ -11,20 +11,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="jobDetailId" column="job_detail_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantit" column="quantit" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutPickSubmitVo">
|
||||
select id, tray_code, job_id, job_detail_id, product_id, quantit from out_pick_submit
|
||||
select id, tray_code, job_id, job_detail_id, product_id, quantit,exit_id,warehouse_id from out_pick_submit
|
||||
</sql>
|
||||
|
||||
<select id="selectOutPickSubmitList" parameterType="OutPickSubmit" resultMap="OutPickSubmitResult">
|
||||
<include refid="selectOutPickSubmitVo"/>
|
||||
select s.id, s.tray_code, s.job_id, s.job_detail_id, s.product_id, s.quantit,p.product_name,s.exit_id,s.warehouse_id from out_pick_submit s left join bas_product p on s.product_id=p.product_id
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and s.tray_code = #{trayCode}</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="jobDetailId != null and jobDetailId != ''"> and job_detail_id = #{jobDetailId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantit != null and quantit != ''"> and quantit = #{quantit}</if>
|
||||
<if test="productId != null and productId != ''"> and s.product_id = #{productId}</if>
|
||||
<if test="quantit != null and quantit != ''"> and s.quantit = #{quantit}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and s.warehouse_id = #{warehouseId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and s.exit_id = #{exitId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -41,6 +46,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="jobDetailId != null">job_detail_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="quantit != null">quantit,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
@@ -48,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="jobDetailId != null">#{jobDetailId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantit != null">#{quantit},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -59,6 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="quantit != null">quantit = #{quantit},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user