Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -183,28 +183,44 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
if (job == null) {
|
||||
return AjaxResult.warn("任务不存在");
|
||||
}
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, job));
|
||||
}
|
||||
basStockService.insertBasStockList(list);
|
||||
mydoJob.setStatus("4");
|
||||
updateMydoJob(mydoJob);
|
||||
if (job.getInOrOut().equals("5")){
|
||||
//料箱盘点入库作业
|
||||
|
||||
//修改货位
|
||||
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setStatus("5");
|
||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
|
||||
return AjaxResult.success();
|
||||
|
||||
}else {
|
||||
//正常入库作业
|
||||
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, job));
|
||||
}
|
||||
basStockService.insertBasStockList(list);
|
||||
mydoJob.setStatus("4");
|
||||
updateMydoJob(mydoJob);
|
||||
//修改货位
|
||||
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail, MydoJob mydoJob) {
|
||||
|
||||
@@ -237,6 +237,7 @@ public class PdaController extends BaseController {
|
||||
* @param trayCodeMakeSure 托盘信息
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:out:outMakeSure')")
|
||||
@PostMapping("/outMakeSure")
|
||||
@ResponseBody
|
||||
public AjaxResult outMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
@@ -248,6 +249,7 @@ public class PdaController extends BaseController {
|
||||
* @param trayCodeMakeSure 托盘信息
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:check:checkMakeSure')")
|
||||
@PostMapping("/checkMakeSure")
|
||||
@ResponseBody
|
||||
public AjaxResult checkMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
|
||||
@@ -252,12 +252,17 @@ public class PdaServiceImp implements PdaService {
|
||||
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
|
||||
if(CollUtil.isNotEmpty(mydoJobDetailList)){
|
||||
boolean flag = mydoJobDetailList.stream().anyMatch(x -> StrUtil.isEmpty(x.getStockId()) && "0".equals(x.getInQuantity()));
|
||||
if (flag){
|
||||
return AjaxResult.warn("新增库存,存在为0的数量");
|
||||
}
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
|
||||
CheckCommitRecord checkCommitRecord = new CheckCommitRecord();
|
||||
checkCommitRecord.setQuantity(mydoJobDetail.getInQuantity());
|
||||
checkCommitRecord.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
checkCommitRecord.setStockId(mydoJobDetail.getStockId());
|
||||
checkCommitRecord.setSpare1(mydoJobDetail.getInOrOutDId());
|
||||
checkCommitRecord.setSpare2(mydoJobDetail.getProductId());
|
||||
checkCommitRecordService.insertCheckCommitRecord(checkCommitRecord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="classId != null and classId != ''"> and class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and 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 in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and in_or_out < 20</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user