opt: 1.出库管理完善。 2.出入库管理任务完成、取消。
This commit is contained in:
@@ -116,6 +116,8 @@
|
||||
LEFT JOIN st_ivt_structattr st on ex.storagevehicle_code = st.storagevehicle_code
|
||||
<where>
|
||||
ex.material_id = #{material_id}
|
||||
AND
|
||||
st.lock_type = 0
|
||||
<if test="pcsn!= null and pcsn!= ''">
|
||||
AND
|
||||
ex.pcsn = #{pcsn}
|
||||
@@ -128,6 +130,10 @@
|
||||
FROM md_pb_storagevehicleext ex LEFT JOIN st_ivt_structattr st on ex.storagevehicle_code = st.storagevehicle_code
|
||||
<where>
|
||||
material_id = #{material_id}
|
||||
AND
|
||||
ex.canuse_qty > 0
|
||||
AND
|
||||
st.lock_type = 0
|
||||
<if test="pcsn!= null and pcsn!= ''">
|
||||
AND
|
||||
pcsn = #{pcsn}
|
||||
|
||||
@@ -3,19 +3,28 @@ package org.nl.wms.sch_manage.service.util.tasks;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.AcsTaskDto;
|
||||
import org.nl.wms.sch_manage.service.util.TaskType;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IRawAssistIStorService;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: Liuxy
|
||||
* @Description: 入库任务类
|
||||
@@ -27,6 +36,12 @@ public class StInTask extends AbstractTask {
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
|
||||
@Resource
|
||||
private IRawAssistIStorService rawAssistIStorService;
|
||||
|
||||
@Resource
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
|
||||
@Override
|
||||
public String create(JSONObject json) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
@@ -83,11 +98,12 @@ public class StInTask extends AbstractTask {
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.FINISHED)) {
|
||||
// this.finishTask(taskObj, TaskFinishedTypeEnum.AUTO_ACS);
|
||||
this.finishTask(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.CANCELED)) {
|
||||
// this.cancelTask(taskObj, TaskFinishedTypeEnum.AUTO_ACS);
|
||||
this.cancelTask(taskObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,7 +112,10 @@ public class StInTask extends AbstractTask {
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
// this.finishTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
|
||||
rawAssistIStorService.taskFinish(taskObj);
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("完成");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +124,11 @@ public class StInTask extends AbstractTask {
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
// this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
|
||||
if (!TaskStatus.CREATE.getCode().equals(taskObj.getTask_status())) {
|
||||
throw new BadRequestException("任务状态必须为生成才能取消任务");
|
||||
}
|
||||
this.cancelTask(taskObj);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,9 +138,33 @@ public class StInTask extends AbstractTask {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finishTask(SchBaseTask taskObj) {
|
||||
// 任务完成
|
||||
rawAssistIStorService.taskFinish(taskObj);
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("完成");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void cancelTask(SchBaseTask taskObj) {
|
||||
// 取消任务
|
||||
taskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||
.set(SchBaseTask::getIs_delete, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
.set(SchBaseTask::getTask_status, TaskStatus.CANCELED.getCode())
|
||||
.set(SchBaseTask::getRemark,"已取消")
|
||||
.eq(SchBaseTask::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
//分配表清除任务
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(),new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getTask_id,null)
|
||||
.set(IOStorInvDis::getPoint_code,null)
|
||||
.set(IOStorInvDis::getIs_issued,0)
|
||||
.set(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
|
||||
// 更新任务状态
|
||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||
taskObj.setRemark("已取消");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
package org.nl.wms.sch_manage.service.util.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.AcsTaskDto;
|
||||
import org.nl.wms.sch_manage.service.util.TaskType;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IOutBillService;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: Liuxy
|
||||
* @Description: 入库任务类
|
||||
* @Date: 2025/5/25
|
||||
*/
|
||||
@Component(value = "STOutTask")
|
||||
@TaskType("STOutTask")
|
||||
public class StOutTask extends AbstractTask {
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
|
||||
@Resource
|
||||
private IOutBillService outBillService;
|
||||
|
||||
@Resource
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
|
||||
@Override
|
||||
public String create(JSONObject json) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getStringId());
|
||||
task.setTask_code(json.getString("TaskCode"));
|
||||
task.setTask_status(TaskStatus.CREATE.getCode());
|
||||
task.setConfig_code(json.getString("task_type"));
|
||||
task.setPoint_code1(json.getString("PickingLocation"));
|
||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||
task.setVehicle_code(json.getString("vehicle_code"));
|
||||
task.setGroup_id(json.getString("group_id"));
|
||||
task.setRequest_param(json.toString());
|
||||
task.setPriority(json.getString("Priority"));
|
||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
task.setCreate_time(DateUtil.now());
|
||||
taskService.save(task);
|
||||
return task.getTask_id();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcsTaskDto sendAcsParam(String taskId) {
|
||||
SchBaseTask taskDao = taskService.getById(taskId);
|
||||
|
||||
// 组织下发给acs的数据
|
||||
AcsTaskDto acsTaskDto = new AcsTaskDto();
|
||||
acsTaskDto.setExt_task_uuid(taskDao.getTask_id());
|
||||
acsTaskDto.setTask_code(taskDao.getTask_code());
|
||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||
if (taskDao.getPoint_code2().contains("-")) {
|
||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2().replace('-', '_'));
|
||||
}
|
||||
acsTaskDto.setPriority(taskDao.getPriority());
|
||||
acsTaskDto.setTask_type("1");
|
||||
|
||||
return acsTaskDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateStatus(String task_code, TaskStatus status) {
|
||||
// 校验任务
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (taskObj.getTask_status().equals(TaskStatus.FINISHED.getCode())) {
|
||||
throw new BadRequestException("该任务已完成!");
|
||||
}
|
||||
if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) {
|
||||
throw new BadRequestException("该任务已取消!");
|
||||
}
|
||||
// 根据传来的类型去对任务进行操作
|
||||
if (status.equals(TaskStatus.EXECUTING)) {
|
||||
taskObj.setTask_status(TaskStatus.EXECUTING.getCode());
|
||||
taskObj.setRemark("执行中");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.FINISHED)) {
|
||||
this.finishTask(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.CANCELED)) {
|
||||
this.cancelTask(taskObj);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceFinish(String task_code) {
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
this.finishTask(taskObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_code) {
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
if (!TaskStatus.CREATE.getCode().equals(taskObj.getTask_status())) {
|
||||
throw new BadRequestException("任务状态必须为生成才能取消任务");
|
||||
}
|
||||
this.cancelTask(taskObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void backMes(String task_code) {
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finishTask(SchBaseTask taskObj) {
|
||||
// 任务完成
|
||||
outBillService.taskFinish(taskObj);
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("完成");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void cancelTask(SchBaseTask taskObj) {
|
||||
|
||||
// 取消任务
|
||||
taskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||
.set(SchBaseTask::getIs_delete, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
.set(SchBaseTask::getTask_status, TaskStatus.CANCELED.getCode())
|
||||
.set(SchBaseTask::getRemark,"已取消")
|
||||
.eq(SchBaseTask::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
|
||||
//分配表清除任务
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(),new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getTask_id,null)
|
||||
.set(IOStorInvDis::getPoint_code,null)
|
||||
.set(IOStorInvDis::getIs_issued,0)
|
||||
.set(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
|
||||
// 更新任务状态
|
||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||
taskObj.setRemark("已取消");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,20 @@ public class OutBillController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(iOutBillService.getCanuseIvt(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改出库单")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.update(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除出库单")
|
||||
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||
iOutBillService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping()
|
||||
@Log("新增出库单")
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) {
|
||||
@@ -119,4 +133,11 @@ public class OutBillController {
|
||||
iOutBillService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/getOutBillTask")
|
||||
@Log("出库单详情作业明细查询")
|
||||
public ResponseEntity<Object> getOutBillTask(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(iOutBillService.getOutBillTask(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RawAssistIStorController {
|
||||
|
||||
@Log("删除出入库单")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||
iRawAssistIStorService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public enum IOSEnum {
|
||||
BILL_TYPE(MapOf.of("生产入库","0001", "手工入库", "0009")),
|
||||
|
||||
//入库分配明细状态
|
||||
INBILL_DIS_STATUS(MapOf.of("生成", "00", "执行中", "01", "完成", "99")),
|
||||
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
||||
|
||||
//组盘记录状态
|
||||
GROUP_PLATE_STATUS(MapOf.of("生成", "00", "组盘", "01", "入库", "02", "出库", "03")),
|
||||
|
||||
@@ -6,11 +6,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDtlDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -45,6 +50,21 @@ public interface IOutBillService extends IService<IOStorInv> {
|
||||
*/
|
||||
IPage<JSONObject> getCanuseIvt(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void update(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 删除出库单
|
||||
*
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(String[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 新增出库单
|
||||
*
|
||||
@@ -131,4 +151,16 @@ public interface IOutBillService extends IService<IOStorInv> {
|
||||
*/
|
||||
void confirm(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 出库单作业明细查询
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
List<IOStorInvDisDto> getOutBillTask(Map whereJson);
|
||||
|
||||
/**
|
||||
* 出库任务完成
|
||||
* @param task
|
||||
*/
|
||||
void taskFinish(SchBaseTask task);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
|
||||
@@ -33,7 +34,7 @@ public interface IRawAssistIStorService extends IService<IOStorInv> {
|
||||
|
||||
String insertDtl(Map whereJson);
|
||||
|
||||
void deleteAll(Long[] ids);
|
||||
void deleteAll(String[] ids);
|
||||
|
||||
void update(Map whereJson);
|
||||
|
||||
@@ -47,6 +48,8 @@ public interface IRawAssistIStorService extends IService<IOStorInv> {
|
||||
|
||||
void confirm(Map whereJson);
|
||||
|
||||
void taskFinish(SchBaseTask task);
|
||||
|
||||
List<IOStorInvDisDto> getDisDtl(Map whereJson);
|
||||
|
||||
Structattr autoDis(JSONObject whereJson);
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface IOStorInvDisMapper extends BaseMapper<IOStorInvDis> {
|
||||
|
||||
List<IOStorInvDisDto> queryInBillDisDtlByIosId(@Param("iostorinvdtl_id")String iostorinvdtl_id);
|
||||
|
||||
List<IOStorInvDisDto> getInBillTaskDtl(@Param("iostorinvdtl_id")String iostorinvdtl_id);
|
||||
List<IOStorInvDisDto> getBillTaskDtl(@Param("iostorinvdtl_id")String iostorinvdtl_id);
|
||||
|
||||
//查询未出库单分配
|
||||
List<IOStorInvDisDto> queryOutBillDisDtl(@Param("params") Map whereJson);
|
||||
|
||||
@@ -18,12 +18,13 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getInBillTaskDtl" resultType="org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto">
|
||||
<select id="getBillTaskDtl" resultType="org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto">
|
||||
SELECT
|
||||
dis.*,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
task.task_code
|
||||
task.task_code,
|
||||
task.task_status
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dis.material_id
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getGroupPlate" resultType="org.nl.wms.warehouse_management.service.dto.GroupPlateDto">
|
||||
SELECT MAX(group_id),storagevehicle_code,gp.material_id,pcsn,MAX(gp.qty_unit_id) as qty_unit_id,MAX(gp.qty_unit_name) as qty_unit_name,SUM(qty) as qty,SUM(qty) as plan_qty,MAX(remark),MAX(`status`),mtl.material_code, mtl.material_name
|
||||
SELECT MAX(group_id) as group_id,storagevehicle_code,gp.material_id,pcsn,MAX(gp.qty_unit_id) as qty_unit_id,MAX(gp.qty_unit_name) as qty_unit_name,SUM(qty) as qty,SUM(qty) as plan_qty,MAX(remark),MAX(`status`),MAX(ext_code) as ext_code,MAX(ext_type) as ext_type,mtl.material_code, mtl.material_name
|
||||
FROM md_pb_groupplate gp
|
||||
LEFT JOIN md_me_materialbase mtl ON gp.material_id = mtl.material_id
|
||||
<where>
|
||||
|
||||
@@ -25,6 +25,11 @@ public class IOStorInvDisDto extends IOStorInvDis {
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
private String task_status;
|
||||
|
||||
/**
|
||||
* 入库时间
|
||||
*/
|
||||
|
||||
@@ -24,11 +24,14 @@ import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.sch_manage.service.util.tasks.StInTask;
|
||||
import org.nl.wms.sch_manage.service.util.tasks.StOutTask;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IOutBillService;
|
||||
@@ -162,6 +165,81 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
whereJson);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(JSONObject whereJson) {
|
||||
String iostorinv_id = (String) whereJson.get("iostorinv_id");
|
||||
|
||||
IOStorInv ioStorInv = ioStorInvMapper.selectById(iostorinv_id);
|
||||
|
||||
if (!IOSEnum.BILL_STATUS.code("生成").equals(ioStorInv.getBill_status())) {
|
||||
throw new BadRequestException("主表状态必须为生成!");
|
||||
}
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
String now = DateUtil.now();
|
||||
|
||||
JSONObject iostorinv_json = new JSONObject();
|
||||
iostorinv_json.put("iostorinv_id",iostorinv_id);
|
||||
iostorinv_json.put("stor_id",whereJson.get("stor_id"));
|
||||
iostorinv_json.put("stor_code",whereJson.get("stor_code"));
|
||||
iostorinv_json.put("stor_name",whereJson.get("stor_name"));
|
||||
iostorinv_json.put("total_qty",whereJson.get("total_qty"));
|
||||
iostorinv_json.put("detail_count",whereJson.get("detail_count"));
|
||||
iostorinv_json.put("biz_date",whereJson.get("biz_date"));
|
||||
iostorinv_json.put("bill_type",whereJson.get("bill_type"));
|
||||
iostorinv_json.put("remark",whereJson.get("remark"));
|
||||
iostorinv_json.put("update_optid",currentUserId);
|
||||
iostorinv_json.put("update_optname",nickName);
|
||||
iostorinv_json.put("update_time",now);
|
||||
|
||||
ioStorInvMapper.updateById(iostorinv_json.toJavaObject(IOStorInv.class));
|
||||
|
||||
//先删除该单据下的所有明细
|
||||
ioStorInvDtlMapper.delete(new LambdaQueryWrapper<>(IOStorInvDtl.class).eq(IOStorInvDtl::getIostorinv_id,iostorinv_id));
|
||||
|
||||
ioStorInvDisMapper.delete(new LambdaQueryWrapper<>(IOStorInvDis.class).eq(IOStorInvDis::getIostorinv_id,iostorinv_id));
|
||||
ArrayList<HashMap> rows = (ArrayList<HashMap>) whereJson.get("tableData");
|
||||
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
HashMap<String, Object> row = rows.get(i);
|
||||
JSONObject ioStorInvDtl = new JSONObject();
|
||||
ioStorInvDtl.putAll(row);
|
||||
ioStorInvDtl.put("iostorinvdtl_id", org.nl.common.utils.IdUtil.getStringId());
|
||||
ioStorInvDtl.put("iostorinv_id", iostorinv_id);
|
||||
ioStorInvDtl.put("seq_no", (i + 1) + "");
|
||||
ioStorInvDtl.put("material_id", row.get("material_id"));
|
||||
ioStorInvDtl.put("Pcsn", row.get("pcsn"));
|
||||
ioStorInvDtl.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
||||
ioStorInvDtl.put("qty_unit_id", row.get("qty_unit_id"));
|
||||
ioStorInvDtl.put("qty_unit_name", row.get("qty_unit_name"));
|
||||
ioStorInvDtl.put("assign_qty", 0);
|
||||
ioStorInvDtl.put("plan_qty", row.get("plan_qty"));
|
||||
ioStorInvDtl.put("unassign_qty", row.get("plan_qty"));
|
||||
|
||||
ioStorInvDtlMapper.insert(ioStorInvDtl.toJavaObject(IOStorInvDtl.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(String[] ids) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
for (String id : ids) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("iostorinv_id", id);
|
||||
param.put("is_delete", BaseDataEnum.IS_YES_NOT.code("是"));
|
||||
param.put("update_optid", currentUserId);
|
||||
param.put("update_optname", nickName);
|
||||
param.put("update_time", now);
|
||||
|
||||
//暂时只软删除出入库单主表
|
||||
ioStorInvMapper.updateById(param.toJavaObject(IOStorInv.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String insertDtl(JSONObject map) {
|
||||
@@ -323,7 +401,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
ioStorInvDis.setQty_unit_id(outAllocation.getQty_unit_id());
|
||||
ioStorInvDis.setQty_unit_name(outAllocation.getQty_unit_name());
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
|
||||
// 未分配数量 - 该库位上的可用数量 < 0 目前做整出
|
||||
// double canuse_qty = outAllocation.getCanuse_qty().doubleValue();
|
||||
@@ -406,7 +484,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
String iostorinv_id = whereJson.getString("iostorinv_id");
|
||||
|
||||
List<IOStorInvDis> ioStorInvDisList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getIs_issued,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(IOStorInvDis::getIostorinv_id,iostorinv_id)
|
||||
);
|
||||
@@ -538,7 +616,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
ioStorInvDis.setQty_unit_id(outAllocation.getQty_unit_id());
|
||||
ioStorInvDis.setQty_unit_name(outAllocation.getQty_unit_name());
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
|
||||
// 未分配数量 - 该库位上的可用数量 < 0 目前做整出
|
||||
// double canuse_qty = outAllocation.getCanuse_qty().doubleValue();
|
||||
@@ -620,7 +698,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
String iostorinv_id = whereJson.getString("iostorinv_id");
|
||||
|
||||
List<IOStorInvDis> ioStorInvDisList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getIs_issued,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(IOStorInvDis::getIostorinv_id,iostorinv_id)
|
||||
.eq(IOStorInvDis::getIostorinvdtl_id,whereJson.getString("iostorinvdtl_id"))
|
||||
@@ -750,7 +828,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
ioStorInvDis.setQty_unit_id(dtl.getQty_unit_id());
|
||||
ioStorInvDis.setQty_unit_name(dtl.getQty_unit_name());
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
|
||||
// 未分配数量 - 该库位上的可用数量 < 0 目前做整出
|
||||
// double canuse_qty = outAllocation.getCanuse_qty().doubleValue();
|
||||
@@ -834,7 +912,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
String iostorinv_id = whereJson.getString("iostorinv_id");
|
||||
|
||||
List<IOStorInvDis> ioStorInvDisList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||
.le(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getIs_issued,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(IOStorInvDis::getIostorinv_id,iostorinv_id)
|
||||
.eq(IOStorInvDis::getIostorinvdis_id,whereJson.getString("iostorinvdis_id"))
|
||||
@@ -875,7 +953,13 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
double unassign_qty = ioStorInvDtl.getUnassign_qty().doubleValue() + (ioStorInvDtl.getPlan_qty().doubleValue()-assign_qty);
|
||||
ioStorInvDtl.setAssign_qty(BigDecimal.valueOf(assign_qty));
|
||||
ioStorInvDtl.setUnassign_qty(BigDecimal.valueOf(unassign_qty));
|
||||
if (assign_qty == 0){
|
||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
|
||||
}else if (unassign_qty == 0){
|
||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("分配完"));
|
||||
}else {
|
||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("分配中"));
|
||||
}
|
||||
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
||||
|
||||
//删除出入库单分配表
|
||||
@@ -929,20 +1013,20 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
for (IOStorInvDis ioStorInvDis:ioStorInvDisList){
|
||||
//创建任务
|
||||
JSONObject task_form = new JSONObject();
|
||||
task_form.put("task_type", "STInTask");
|
||||
task_form.put("task_type", "STOutTask");
|
||||
task_form.put("TaskCode",CodeUtil.getNewCode("TASK_CODE"));
|
||||
task_form.put("PickingLocation", point_code);
|
||||
task_form.put("PlacedLocation", ioStorInvDis.getStruct_code());
|
||||
task_form.put("PickingLocation", ioStorInvDis.getStruct_code());
|
||||
task_form.put("PlacedLocation", point_code);
|
||||
task_form.put("vehicle_code", ioStorInvDis.getStoragevehicle_code());
|
||||
|
||||
StInTask stInTask = SpringContextHolder.getBean("STInTask");
|
||||
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
|
||||
|
||||
String task_id = stInTask.create(task_form);
|
||||
String task_id = stOutTask.create(task_form);
|
||||
|
||||
//分配明细表更新任务相关数据
|
||||
IOStorInvDis dis = new IOStorInvDis();
|
||||
dis.setIostorinvdis_id(ioStorInvDis.getIostorinvdis_id());
|
||||
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("执行中"));
|
||||
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
dis.setTask_id(task_id);
|
||||
dis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("是"));
|
||||
dis.setPoint_code(point_code);
|
||||
@@ -974,6 +1058,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
.eq(IOStorInvDis::getIostorinv_id,whereJson.get("iostorinv_id"))
|
||||
);
|
||||
|
||||
//需要更新的出入库单明细
|
||||
Set<String> dtlSet = new HashSet<>();
|
||||
|
||||
for (IOStorInvDis ioStorInvDis: storInvDisList){
|
||||
if (StrUtil.isNotBlank(ioStorInvDis.getStruct_code())){
|
||||
//解绑仓位
|
||||
@@ -995,7 +1082,13 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
//修改库存 减冻结加可用
|
||||
List<JSONObject> updateIvtList = new ArrayList<>();
|
||||
JSONObject jsonIvt = new JSONObject();
|
||||
|
||||
//判断分配明细是否分配了出库点位和任务号 分配则恢复库存等待手持减扣 没分配则减扣库存
|
||||
if (StrUtil.isNotBlank(ioStorInvDis.getPoint_code()) && StrUtil.isNotBlank(ioStorInvDis.getTask_id())){
|
||||
jsonIvt.put("type", IOSConstant.UPDATE_IVT_TYPE_SUB_FROZEN_ADD_CANUSE);
|
||||
}else {
|
||||
jsonIvt.put("type", IOSConstant.UPDATE_IVT_TYPE_SUB_FROZEN);
|
||||
}
|
||||
jsonIvt.put("storagevehicle_code", ioStorInvDis.getStoragevehicle_code());
|
||||
jsonIvt.put("material_id", ioStorInvDis.getMaterial_id());
|
||||
jsonIvt.put("pcsn", ioStorInvDis.getPcsn());
|
||||
@@ -1006,20 +1099,16 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
iMdPbStoragevehicleextService.updateIvt(updateIvtList);
|
||||
}
|
||||
|
||||
//更新详情数据
|
||||
//更新分配明细数据
|
||||
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
.set(IOStorInvDis::getReal_qty,ioStorInvDis.getPlan_qty())
|
||||
.set(IOStorInvDis::getReal_qty,BigDecimal.ZERO)
|
||||
.eq(IOStorInvDis::getIostorinvdis_id,ioStorInvDis.getIostorinvdis_id())
|
||||
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
);
|
||||
|
||||
ioStorInvDtlMapper.update(new IOStorInvDtl(),new LambdaUpdateWrapper<>(IOStorInvDtl.class)
|
||||
.set(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
.set(IOStorInvDtl::getReal_qty,ioStorInvDis.getPlan_qty())
|
||||
.eq(IOStorInvDtl::getIostorinvdtl_id,ioStorInvDis.getIostorinvdtl_id())
|
||||
.ne(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
);
|
||||
//添加需要更新的明细标识
|
||||
dtlSet.add(ioStorInvDis.getIostorinvdtl_id());
|
||||
|
||||
//更新组盘记录表
|
||||
groupPlateMapper.update(new GroupPlate(),new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
@@ -1030,6 +1119,15 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
);
|
||||
}
|
||||
|
||||
//更新出库明细单状态
|
||||
for (String dtlId:dtlSet){
|
||||
ioStorInvDtlMapper.update(new IOStorInvDtl(),new LambdaUpdateWrapper<>(IOStorInvDtl.class)
|
||||
.set(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
.set(IOStorInvDtl::getReal_qty,BigDecimal.ZERO)
|
||||
.eq(IOStorInvDtl::getIostorinvdtl_id,dtlId)
|
||||
);
|
||||
}
|
||||
|
||||
//更新主表状态
|
||||
ioStorInvMapper.update(ioStorInv,new LambdaUpdateWrapper<>(IOStorInv.class)
|
||||
.set(IOStorInv::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
@@ -1040,4 +1138,107 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IOStorInvDisDto> getOutBillTask(Map whereJson) {
|
||||
String iostorinvdtl_id = (String) whereJson.get("iostorinvdtl_id");
|
||||
return ioStorInvDisMapper.getBillTaskDtl(iostorinvdtl_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void taskFinish(SchBaseTask task) {
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectOne(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.eq(IOStorInvDis::getTask_id,task.getTask_id())
|
||||
);
|
||||
if (ObjectUtil.isEmpty(ioStorInvDis)){
|
||||
throw new BadRequestException("未找到任务对应的分配明细");
|
||||
}
|
||||
|
||||
// 完成当前分配明细
|
||||
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
.set(IOStorInvDis::getReal_qty,ioStorInvDis.getPlan_qty())
|
||||
.eq(IOStorInvDis::getIostorinvdis_id,ioStorInvDis.getIostorinvdis_id())
|
||||
);
|
||||
|
||||
//解锁库位
|
||||
JSONObject finish_map = new JSONObject();
|
||||
finish_map.put("struct_code",ioStorInvDis.getStruct_code());
|
||||
finish_map.put("storagevehicle_code",null);
|
||||
finish_map.put("inv_type", null);
|
||||
finish_map.put("inv_id", null);
|
||||
finish_map.put("inv_code", null);
|
||||
iStructattrService.updateStatusByCode("1",finish_map);
|
||||
|
||||
//修改库存 恢复库存 手持进行减扣
|
||||
List<JSONObject> updateIvtList = new ArrayList<>();
|
||||
JSONObject jsonIvt = new JSONObject();
|
||||
jsonIvt.put("type", IOSConstant.UPDATE_IVT_TYPE_SUB_FROZEN_ADD_CANUSE);
|
||||
jsonIvt.put("storagevehicle_code", ioStorInvDis.getStoragevehicle_code());
|
||||
jsonIvt.put("material_id", ioStorInvDis.getMaterial_id());
|
||||
jsonIvt.put("pcsn", ioStorInvDis.getPcsn());
|
||||
jsonIvt.put("qty_unit_id", ioStorInvDis.getQty_unit_id());
|
||||
jsonIvt.put("qty_unit_name", ioStorInvDis.getQty_unit_name());
|
||||
jsonIvt.put("change_qty", ioStorInvDis.getPlan_qty());
|
||||
updateIvtList.add(jsonIvt);
|
||||
iMdPbStoragevehicleextService.updateIvt(updateIvtList);
|
||||
|
||||
//库存绑定到出库点。
|
||||
schBasePointMapper.update(new SchBasePoint(),new LambdaUpdateWrapper<>(SchBasePoint.class)
|
||||
.set(SchBasePoint::getVehicle_code,ioStorInvDis.getStoragevehicle_code())
|
||||
.set(SchBasePoint::getIos_id,ioStorInvDis.getIostorinvdis_id())
|
||||
.eq(SchBasePoint::getPoint_code,ioStorInvDis.getPoint_code())
|
||||
);
|
||||
|
||||
//更新组盘记录表
|
||||
groupPlateMapper.update(new GroupPlate(),new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getStatus,IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
||||
.eq(GroupPlate::getPcsn,ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getMaterial_id,ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStoragevehicle_code,ioStorInvDis.getStoragevehicle_code())
|
||||
);
|
||||
|
||||
// 查询该明细下是否还有未完成的分配明细
|
||||
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.eq(IOStorInvDis::getIostorinvdtl_id,ioStorInvDis.getIostorinvdtl_id())
|
||||
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
);
|
||||
|
||||
// 明细
|
||||
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
||||
if (ObjectUtil.isEmpty(ioStorInvDtl)){
|
||||
throw new BadRequestException("未找到明细");
|
||||
}
|
||||
// 如果分配明细全部完成则更新明细表状态
|
||||
if (countDis == 0){
|
||||
// 更新明细表状态
|
||||
ioStorInvDtl.setReal_qty(ioStorInvDis.getPlan_qty());
|
||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
||||
|
||||
// 查看明细是否全部完成
|
||||
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
||||
.eq(IOStorInvDtl::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||
.ne(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
);
|
||||
|
||||
// 如果明细全部完成则更新主表状态
|
||||
if (countDtl == 0){
|
||||
//更新主表状态
|
||||
ioStorInvMapper.update(new IOStorInv(),new LambdaUpdateWrapper<>(IOStorInv.class)
|
||||
.set(IOStorInv::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
.set(IOStorInv::getConfirm_optid,currentUserId)
|
||||
.set(IOStorInv::getConfirm_optname,nickName)
|
||||
.set(IOStorInv::getConfirm_time,now)
|
||||
.eq(IOStorInv::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleinfoMapper;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.tasks.StInTask;
|
||||
@@ -209,7 +210,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
dis.put("material_id", row.get("material_id"));
|
||||
dis.put("pcsn", row.get("pcsn"));
|
||||
dis.put("storagevehicle_code", row.get("storagevehicle_code"));
|
||||
dis.put("work_status", IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
dis.put("work_status", IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
dis.put("is_issued", BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
dis.put("qty_unit_id", row.get("qty_unit_id"));
|
||||
dis.put("qty_unit_name", row.get("qty_unit_name"));
|
||||
@@ -223,14 +224,14 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Long[] ids) {
|
||||
public void deleteAll(String[] ids) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
for (Long id : ids) {
|
||||
for (String id : ids) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("iostorinv_id", String.valueOf(id));
|
||||
param.put("iostorinv_id", id);
|
||||
param.put("is_delete", BaseDataEnum.IS_YES_NOT.code("是"));
|
||||
param.put("update_optid", currentUserId);
|
||||
param.put("update_optname", nickName);
|
||||
@@ -290,8 +291,9 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
ioStorInvDtl.put("bill_status",IOSEnum.BILL_STATUS.code("生成"));
|
||||
ioStorInvDtl.put("qty_unit_id",row.get("qty_unit_id"));
|
||||
ioStorInvDtl.put("qty_unit_name",row.get("qty_unit_name"));
|
||||
ioStorInvDtl.put("assign_qty",row.get("qty"));
|
||||
ioStorInvDtl.put("assign_qty",0);
|
||||
ioStorInvDtl.put("plan_qty",row.get("plan_qty"));
|
||||
ioStorInvDtl.put("unassign_qty",row.get("qty"));
|
||||
|
||||
//判断该载具编号是否已经存在库内
|
||||
Structattr structattr = iStructattrService.getOne(new LambdaQueryWrapper<>(Structattr.class).eq(Structattr::getStoragevehicle_code,row.get("storagevehicle_code")));
|
||||
@@ -309,7 +311,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
dis.put("material_id", row.get("material_id"));
|
||||
dis.put("pcsn", row.get("pcsn"));
|
||||
dis.put("storagevehicle_code", row.get("storagevehicle_code"));
|
||||
dis.put("work_status", IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
dis.put("work_status", IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
dis.put("is_issued", BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
dis.put("qty_unit_id", row.get("qty_unit_id"));
|
||||
dis.put("qty_unit_name", row.get("qty_unit_name"));
|
||||
@@ -531,7 +533,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
//分配明细表更新任务相关数据
|
||||
IOStorInvDis dis = new IOStorInvDis();
|
||||
dis.setIostorinvdis_id(map.get("iostorinvdis_id"));
|
||||
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("执行中"));
|
||||
dis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
|
||||
dis.setTask_id(task_id);
|
||||
dis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("是"));
|
||||
dis.setPoint_code(point_code);
|
||||
@@ -618,6 +620,96 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void taskFinish(SchBaseTask task) {
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectOne(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.eq(IOStorInvDis::getTask_id,task.getTask_id())
|
||||
);
|
||||
if (ObjectUtil.isEmpty(ioStorInvDis)){
|
||||
throw new BadRequestException("未找到任务对应的分配明细");
|
||||
}
|
||||
|
||||
// 完成当前分配明细
|
||||
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
.set(IOStorInvDis::getReal_qty,ioStorInvDis.getPlan_qty())
|
||||
.eq(IOStorInvDis::getIostorinvdis_id,ioStorInvDis.getIostorinvdis_id())
|
||||
);
|
||||
|
||||
//解锁库位
|
||||
JSONObject finish_map = new JSONObject();
|
||||
finish_map.put("struct_code",ioStorInvDis.getStruct_code());
|
||||
finish_map.put("storagevehicle_code",ioStorInvDis.getStoragevehicle_code());
|
||||
finish_map.put("inv_type", null);
|
||||
finish_map.put("inv_id", null);
|
||||
finish_map.put("inv_code", null);
|
||||
iStructattrService.updateStatusByCode("1",finish_map);
|
||||
|
||||
//修改库存
|
||||
List<JSONObject> updateIvtList = new ArrayList<>();
|
||||
JSONObject jsonIvt = new JSONObject();
|
||||
jsonIvt.put("type", IOSConstant.UPDATE_IVT_TYPE_ADD_CANUSE);
|
||||
jsonIvt.put("storagevehicle_code", ioStorInvDis.getStoragevehicle_code());
|
||||
jsonIvt.put("material_id", ioStorInvDis.getMaterial_id());
|
||||
jsonIvt.put("pcsn", ioStorInvDis.getPcsn());
|
||||
jsonIvt.put("qty_unit_id", ioStorInvDis.getQty_unit_id());
|
||||
jsonIvt.put("qty_unit_name", ioStorInvDis.getQty_unit_name());
|
||||
jsonIvt.put("change_qty", ioStorInvDis.getPlan_qty());
|
||||
updateIvtList.add(jsonIvt);
|
||||
iMdPbStoragevehicleextService.updateIvt(updateIvtList);
|
||||
|
||||
//更新组盘记录表
|
||||
groupPlateMapper.update(new GroupPlate(),new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getStatus,IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
.eq(GroupPlate::getPcsn,ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getMaterial_id,ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStoragevehicle_code,ioStorInvDis.getStoragevehicle_code())
|
||||
);
|
||||
|
||||
// 查询该明细下是否还有未完成的分配明细
|
||||
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.eq(IOStorInvDis::getIostorinvdtl_id,ioStorInvDis.getIostorinvdtl_id())
|
||||
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||
);
|
||||
|
||||
// 明细
|
||||
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
||||
if (ObjectUtil.isEmpty(ioStorInvDtl)){
|
||||
throw new BadRequestException("未找到明细");
|
||||
}
|
||||
// 如果分配明细全部完成则更新明细表状态
|
||||
if (countDis == 0){
|
||||
// 更新明细表状态
|
||||
ioStorInvDtl.setReal_qty(ioStorInvDis.getPlan_qty());
|
||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
||||
|
||||
// 查看明细是否全部完成
|
||||
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
||||
.eq(IOStorInvDtl::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||
.ne(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
);
|
||||
|
||||
// 如果明细全部完成则更新主表状态
|
||||
if (countDtl == 0){
|
||||
//更新主表状态
|
||||
ioStorInvMapper.update(new IOStorInv(),new LambdaUpdateWrapper<>(IOStorInv.class)
|
||||
.set(IOStorInv::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||
.set(IOStorInv::getConfirm_optid,currentUserId)
|
||||
.set(IOStorInv::getConfirm_optname,nickName)
|
||||
.set(IOStorInv::getConfirm_time,now)
|
||||
.eq(IOStorInv::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IOStorInvDisDto> getDisDtl(Map whereJson) {
|
||||
//查询该明细下的所有入库分配载具明细
|
||||
@@ -661,6 +753,6 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
@Override
|
||||
public List<IOStorInvDisDto> getInBillTaskDtl(Map whereJson) {
|
||||
String iostorinvdtl_id = (String) whereJson.get("iostorinvdtl_id");
|
||||
return ioStorInvDisMapper.getInBillTaskDtl(iostorinvdtl_id);
|
||||
return ioStorInvDisMapper.getBillTaskDtl(iostorinvdtl_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,6 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getBillDtl(params) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getBillDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getIODtl(params) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getIODtl',
|
||||
@@ -40,14 +32,6 @@ export function getIODtl(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function commit(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/commit',
|
||||
@@ -55,15 +39,6 @@ export function commit(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function checkVehicle(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/checkVehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDisDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/deleteDisDtl',
|
||||
@@ -87,15 +62,6 @@ export function divStruct(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function allDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/allDivStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/unDivStruct',
|
||||
@@ -111,63 +77,6 @@ export function divPoint(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/queryTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function bucketDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/bucketDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/updateTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reIssueTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/reIssueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/cancelTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/confirm',
|
||||
@@ -176,14 +85,6 @@ export function confirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function backConfirm(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/backConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getInBillTaskDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getInBillTaskDtl',
|
||||
@@ -192,5 +93,5 @@ export function getInBillTaskDtl(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, insertDtl, getIODtl, commit,
|
||||
export default { add, edit, del, getIODtl, commit,
|
||||
deleteDisDtl, getDisDtl, divStruct, unDivStruct, divPoint, confirm, getInBillTaskDtl }
|
||||
|
||||
@@ -149,8 +149,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center">
|
||||
<template scope="scope">
|
||||
<el-input-number v-show="!scope.row.edit" v-model="scope.row.qty" :precision="3" :controls="false" :min="1" style="width: 120px" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.qty }}</span>
|
||||
<el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 120px" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
@@ -168,7 +168,7 @@
|
||||
</el-table>
|
||||
|
||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
|
||||
<!-- <MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -322,6 +322,8 @@ export default {
|
||||
},
|
||||
tableChanged(rows) {
|
||||
rows.forEach((item) => {
|
||||
// 添加plan_qty
|
||||
item.plan_qty = item.qty
|
||||
if (this.form.tableData.length !== 0) {
|
||||
this.flagnow = false
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
@@ -332,12 +334,12 @@ export default {
|
||||
if (!this.flagnow) {
|
||||
item.edit = true
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
}
|
||||
} else {
|
||||
item.edit = true
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
@@ -359,22 +361,12 @@ export default {
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const pcsn = rows[index].pcsn
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (pcsn === obj.pcsn) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].qty)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
clearable
|
||||
style="width: 220px"
|
||||
size="mini"
|
||||
:disabled="queryrow.pcsn!=='' && queryrow.pcsn!==null"
|
||||
:disabled="pscnDisabled"
|
||||
placeholder="批次号"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
@@ -136,6 +136,7 @@ export default {
|
||||
dialogVisible: false,
|
||||
dialogVisible2: false,
|
||||
fullscreenLoading: false,
|
||||
pscnDisabled: false,
|
||||
goal_unassign_qty: 0,
|
||||
queryrow: {},
|
||||
sects: [],
|
||||
@@ -156,6 +157,9 @@ export default {
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
if (this.queryrow.pcsn !== '' && this.queryrow.pcsn !== null) {
|
||||
this.pscnDisabled = true
|
||||
}
|
||||
this.goal_unassign_qty = JSON.parse(JSON.stringify(this.queryrow.unassign_qty))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,17 +128,12 @@
|
||||
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
|
||||
<el-table-column min-width="140" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="子卷号" width="150px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" width="120px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批次号" width="150px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="assign_qty" :formatter="crud.formatNum3" label="已分配重量" align="center" width="100px" />
|
||||
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配重量" align="center" width="100px" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<!-- <el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />-->
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column prop="vbeln" label="交货单号" align="center" width="120px" />
|
||||
<el-table-column prop="posnr" label="行号" align="center" width="70px" />
|
||||
<el-table-column prop="width" label="幅宽" align="center" width="110px" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
@@ -160,16 +155,13 @@
|
||||
>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="子卷批次号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="sap_pcsn" label="sap批次号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="box_no" label="箱号" align="center" width="250px" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="sect_name" label="区域" align="center" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="is_overdue" width="150px" label="是否超期" align="center" :formatter="formatOverdue" />
|
||||
<!-- <el-table-column prop="next_point_code" label="目的位置" align="center" />-->
|
||||
<!-- <el-table-column prop="task_code" label="任务号" align="center" />-->
|
||||
<!-- <el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />-->
|
||||
<el-table-column prop="point_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<!-- <el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />-->
|
||||
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
|
||||
</el-table>
|
||||
@@ -182,6 +174,7 @@
|
||||
import { crud } from '@crud/crud'
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
import { getOutBillTask } from './checkoutbill'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
@@ -272,7 +265,7 @@ export default {
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
checkoutbill.getOutBillTask2({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
checkoutbill.getOutBillTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
|
||||
@@ -38,26 +38,6 @@ export function getOutBillDis(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getOutBillDisDtl(params) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/getOutBillDisDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getInvTypes() {
|
||||
return request({
|
||||
url: '/api/checkoutbill/getInvTypes',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allDiv(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/allDiv',
|
||||
@@ -114,85 +94,9 @@ export function confirm(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function issueTask(data) {
|
||||
export function getOutBillTask(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/issueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function finishTask(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/finishTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function cancleTaskfinish(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/cancleTaskfinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function paramByCodeType(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/paramByCodeType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function schAreaType(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/schAreaType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function backConfirm(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/backConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getType() {
|
||||
return request({
|
||||
url: '/api/checkoutbill/getType',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function moneySubmit(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/moneySubmit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getDisNum(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/getDisNum',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function queryBox(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/queryBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getOutBillTask2(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/getOutBillTask2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function cancelTask(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/cancelTask',
|
||||
url: '/api/checkoutbill/getOutBillTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -204,13 +108,6 @@ export function allSetPoint(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function oneSetPoint2(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/oneSetPoint2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function outReturn(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/outReturn',
|
||||
@@ -218,18 +115,5 @@ export function outReturn(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/importExcel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function saveUpdate(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/saveUpdate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, autoCancel, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2, outReturn, excelImport, saveUpdate }
|
||||
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, autoCancel, getStructIvt, manualDiv, confirm, allDivOne, getOutBillTask, oneCancel, allSetPoint, outReturn }
|
||||
|
||||
Reference in New Issue
Block a user