入库部分和接口
This commit is contained in:
@@ -118,7 +118,7 @@ public class InStockinServiceImpl implements IInStockinService
|
|||||||
inStockin.setCreateDate(DateUtil.formatDateTime(DateUtil.date()));
|
inStockin.setCreateDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
inStockin.setSpare3(DateUtil.formatDateTime(DateUtil.date()));
|
inStockin.setSpare3(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
inStockin.setCreateManId(Convert.toStr(SecurityUtils.getUsername()));
|
inStockin.setCreateManId(Convert.toStr(SecurityUtils.getUsername()));
|
||||||
inStockin.setSpare4(Convert.toStr(SecurityUtils.getUserId()));
|
inStockin.setSpare4(Convert.toStr(SecurityUtils.getUsername()));
|
||||||
inStockin.setSupplierNo(inStockinVo.getSupplierId());
|
inStockin.setSupplierNo(inStockinVo.getSupplierId());
|
||||||
inStockin.setErpBill(inStockinVo.getErpBill());
|
inStockin.setErpBill(inStockinVo.getErpBill());
|
||||||
inStockin.setInType(inStockinVo.getInType());
|
inStockin.setInType(inStockinVo.getInType());
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
private PdaMapper pdaMapper;
|
private PdaMapper pdaMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
||||||
|
@Autowired
|
||||||
|
private IMydoJobService mydoJobService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -182,20 +184,9 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
if (job == null) {
|
if (job == null) {
|
||||||
return AjaxResult.warn("任务不存在");
|
return AjaxResult.warn("任务不存在");
|
||||||
}
|
}
|
||||||
if (!"1".equals(job.getStatus())) {
|
|
||||||
return AjaxResult.warn("只能作废未开始的任务");
|
|
||||||
}
|
|
||||||
if ("1".equals(job.getInOrOut())) {
|
|
||||||
mydoJob.setStatus("5");
|
|
||||||
updateMydoJob(mydoJob);
|
|
||||||
//修改货位状态
|
|
||||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
|
||||||
basCargoSpace.setStatus("1");
|
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
|
||||||
//插入历史表
|
|
||||||
insertHistory(mydoJob.getJobId());
|
|
||||||
|
|
||||||
} else if ("2".equals(job.getInOrOut())|| "3".equals(job.getInOrOut())){
|
if ("1".equals(job.getInOrOut())) {
|
||||||
|
|
||||||
MydoJobDetail param = new MydoJobDetail();
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
param.setJobId(jobId);
|
param.setJobId(jobId);
|
||||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||||
@@ -209,20 +200,32 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
||||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||||
}
|
}
|
||||||
|
mydoJob.setStatus("5");
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
|
//修改货位状态
|
||||||
|
if(job.getCargoSpaceId()!=null && job.getCargoSpaceId()!=""){
|
||||||
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||||
|
basCargoSpace.setStatus("1");
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
//插入历史表
|
||||||
|
insertHistory(mydoJob.getJobId());
|
||||||
|
|
||||||
|
} else{
|
||||||
|
if(job.getCargoSpaceId()!=null && job.getCargoSpaceId()!="") {
|
||||||
//修改货位状态
|
//修改货位状态
|
||||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||||
basCargoSpace.setStatus("1");
|
basCargoSpace.setStatus("1");
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
}
|
||||||
mydoJob.setStatus("5");
|
mydoJob.setStatus("5");
|
||||||
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
|
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||||
updateMydoJob(mydoJob);
|
updateMydoJob(mydoJob);
|
||||||
//插入历史表
|
//插入历史表
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
}
|
}
|
||||||
//通知wcs
|
|
||||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
|
||||||
log.info("取消任务结果:{}", ajaxResult);
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,8 +247,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult manualCompleted(MydoJob mydoJobParam, int type) {
|
public AjaxResult manualCompleted(MydoJob mydoJobParam, int type) {
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
|
||||||
String jobId = mydoJobParam.getJobId();
|
String jobId = mydoJobParam.getJobId();
|
||||||
|
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(jobId);
|
||||||
|
if(Integer.valueOf(mydoJob.getStatus())<3){
|
||||||
|
return AjaxResult.error("只能完成正执行的作业");
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
map.put("v_job_id", jobId);
|
map.put("v_job_id", jobId);
|
||||||
mydoJobMapper.manualCompleted(map);
|
mydoJobMapper.manualCompleted(map);
|
||||||
if (!"10".equals(map.get("v_result").toString())) {
|
if (!"10".equals(map.get("v_result").toString())) {
|
||||||
|
|||||||
@@ -72,15 +72,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
is2.spare4,
|
is2.spare4,
|
||||||
is2.spare3,
|
is2.spare3,
|
||||||
is2.spare5,
|
is2.spare5,
|
||||||
bw.warehouse_name,
|
bw.warehouse_name
|
||||||
bs.supplier_name,
|
-- bs.supplier_name,
|
||||||
sd.dept_name ,
|
-- sd.dept_name ,
|
||||||
su.user_name
|
-- su.user_name
|
||||||
from in_stockin_finish is2
|
from in_stockin_finish is2
|
||||||
left join bas_warehouse bw on is2.warehouse_id = bw.warehouse_id
|
left join bas_warehouse bw on is2.warehouse_id = bw.warehouse_id
|
||||||
left join bas_supplier bs on bs.supplier_no = is2.supplier_no
|
-- left join bas_supplier bs on bs.supplier_no = is2.supplier_no
|
||||||
left join sys_dept sd on is2.department_no = sd.dept_id
|
-- left join sys_dept sd on is2.department_no = sd.dept_id
|
||||||
left join sys_user su on su.user_id = is2.create_man_id</sql>
|
-- left join sys_user su on su.user_id = is2.create_man_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="selectInStockinFinishList" parameterType="InStockinFinish" resultMap="InStockinFinishResult">
|
<select id="selectInStockinFinishList" parameterType="InStockinFinish" resultMap="InStockinFinishResult">
|
||||||
<include refid="selectInStockinFinishVo"/>
|
<include refid="selectInStockinFinishVo"/>
|
||||||
|
|||||||
@@ -407,7 +407,11 @@ export default {
|
|||||||
if (row.type === 'invalid'){
|
if (row.type === 'invalid'){
|
||||||
//手动作废
|
//手动作废
|
||||||
manualInvalidation(data).then(response => {
|
manualInvalidation(data).then(response => {
|
||||||
|
if(response.code==200) {
|
||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError('操作失败');
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -415,7 +419,12 @@ export default {
|
|||||||
}else if (row.type === 'completed'){
|
}else if (row.type === 'completed'){
|
||||||
//手动完成
|
//手动完成
|
||||||
manualCompleted(data).then(response => {
|
manualCompleted(data).then(response => {
|
||||||
|
if(response.code==200){
|
||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError(response.msg);
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
warehouseId: "01",
|
warehouseId: "01",
|
||||||
supplierId: this.form.supplierId,
|
supplierId: this.form.supplierId,
|
||||||
classNo:this.classNo,
|
classNo:this.form.classNo,
|
||||||
remark: this.form.remark,
|
remark: this.form.remark,
|
||||||
inType:this.form.inType,
|
inType:this.form.inType,
|
||||||
erpBill:this.form.erpBill,
|
erpBill:this.form.erpBill,
|
||||||
@@ -716,6 +716,7 @@ export default {
|
|||||||
spare1: item.spare1,
|
spare1: item.spare1,
|
||||||
spare2: item.spare2,
|
spare2: item.spare2,
|
||||||
spare3: item.spare3,
|
spare3: item.spare3,
|
||||||
|
spec:item.spec,
|
||||||
// spare4: item.spare4,
|
// spare4: item.spare4,
|
||||||
// spare5: item.spare5,
|
// spare5: item.spare5,
|
||||||
// spare6: item.spare6,
|
// spare6: item.spare6,
|
||||||
|
|||||||
@@ -152,18 +152,18 @@
|
|||||||
>单据确认<!--单据确认-->
|
>单据确认<!--单据确认-->
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- type="info"-->
|
type="info"
|
||||||
<!-- plain-->
|
plain
|
||||||
<!-- icon="el-icon-download"-->
|
icon="el-icon-download"
|
||||||
<!-- size="mini"-->
|
size="mini"
|
||||||
<!-- :disabled="detailMultiple"-->
|
:disabled="detailMultiple"
|
||||||
<!-- @click="handleBarcodePrinting"-->
|
@click="handleBarcodePrinting"
|
||||||
<!-- v-hasPermi="['in:stockIn:barcodePrinting']"-->
|
v-hasPermi="['in:stockIn:barcodePrinting']"
|
||||||
<!-- >打印条码<!–打印条码–>-->
|
>打印条码<!--打印条码-->
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user