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