退货入库逻辑修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.job.mydojob.mapper;
|
||||
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -76,4 +77,6 @@ public interface MydoJobMapper
|
||||
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
|
||||
|
||||
void cargoSpaceOut(HashMap<String, Object> map);
|
||||
|
||||
List<OutJobExcel> exportOutJob(String stockoutId);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.job.mydojob.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -117,4 +118,6 @@ public interface IMydoJobService
|
||||
public void insertHistory(String jobId) ;
|
||||
|
||||
AjaxResult cargoSpaceOut(String warehouseId, String cargoSpaceId, String exitId);
|
||||
|
||||
List<OutJobExcel> exportOutJob(String stockoutId);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.pda.mapper.PdaMapper;
|
||||
@@ -311,6 +312,11 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
return AjaxResult.success(map.get("v_resultmsg"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutJobExcel> exportOutJob(String stockoutId) {
|
||||
return mydoJobMapper.exportOutJob(stockoutId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成任务表
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
@@ -54,13 +55,25 @@ public class OutStockoutController extends BaseController {
|
||||
/**
|
||||
* 导出出库主单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:export')")
|
||||
/*@PreAuthorize("@ss.hasPermi('out:outStockout:export')")
|
||||
@Log(title = "出库主单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockout outStockout) {
|
||||
List<OutStockout> list = outStockoutService.selectOutStockoutList(outStockout);
|
||||
ExcelUtil<OutStockout> util = new ExcelUtil<OutStockout>(OutStockout.class);
|
||||
util.exportExcel(response, list, "出库主单数据");
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 导出出库主单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:export')")
|
||||
@Log(title = "出库任务导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockout outStockout) {
|
||||
List<OutJobExcel> list = outStockoutService.exportOutJob(outStockout.getStockoutId());
|
||||
ExcelUtil<OutJobExcel> util = new ExcelUtil<OutJobExcel>(OutJobExcel.class);
|
||||
util.exportExcel(response, list, "出库任务");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.out.outStockout.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OutJobExcel {
|
||||
|
||||
@Excel(name = "台次")
|
||||
private String spare5;
|
||||
@Excel(name = "合同号")
|
||||
private String spare6;
|
||||
@Excel(name = "产品号")
|
||||
private String spare7;
|
||||
@Excel(name = "代号")
|
||||
private String spare9;
|
||||
@Excel(name = "存货编码")
|
||||
private String productId;
|
||||
@Excel(name = "存货名称")
|
||||
private String productName;
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
@Excel(name = "出库数量")
|
||||
private String outQuantity;
|
||||
@Excel(name = "货位编码")
|
||||
private String cargoSpaceId;
|
||||
@Excel(name = "货位名称")
|
||||
private String cargoSpaceName;
|
||||
@Excel(name = "规格")
|
||||
private String spec;
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.out.outStockout.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
|
||||
@@ -73,4 +74,6 @@ public interface IOutStockoutService
|
||||
List<OutStockout> selectOutStockoutListApi(OutStockout outStockoutParam);
|
||||
|
||||
AjaxResult manualAllot(String[] stockList,String stockoutDetailId);
|
||||
|
||||
List<OutJobExcel> exportOutJob(String stockoutId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.out.outStockout.domain.OutJobExcel;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockout.mapper.OutStockoutMapper;
|
||||
@@ -46,6 +48,8 @@ public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||
private IOutStockoutDetailService outStockoutDetailService;
|
||||
@Autowired
|
||||
private IToWcsService toWcsService;
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
/**
|
||||
* 查询出库主单
|
||||
@@ -230,4 +234,9 @@ public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutJobExcel> exportOutJob(String stockoutId) {
|
||||
return mydoJobService.exportOutJob(stockoutId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,4 +247,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
<select id="exportOutJob" resultType="com.ruoyi.out.outStockout.domain.OutJobExcel">
|
||||
select mjd.spare5,mjd.spare6,mjd.spare7,mjd.spare9,mjd.out_quantity as outQuantity,mj.tray_code as trayCode,mj.cargo_space_id as cargoSpaceId,
|
||||
bcs.cargo_space_name as cargoSpaceName,bp.product_name as productName,bp.unit,bp.spec,mjd.product_id as productId
|
||||
from mydo_job_detail mjd
|
||||
left join mydo_job mj on mjd.job_id = mj.job_id
|
||||
left join bas_cargo_space bcs on bcs.cargo_space_id = mj.cargo_space_id
|
||||
left join bas_product bp on bp.product_id = mjd.product_id
|
||||
where mjd.in_or_out_id = #{stockoutId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleCreateReturnStockIn"
|
||||
v-hasPermi="['in:stockIn:productBack']"
|
||||
>生成退料入库单</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
||||
@@ -119,6 +119,17 @@
|
||||
v-hasPermi="['out:outStockout:manualAllot']"
|
||||
>{{'手动分配'}}</el-button> <!-- 手动分配 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleExportTask"
|
||||
v-hasPermi="['out:outStockout:export']"
|
||||
>{{'生成excel'}}</el-button> <!-- 导出任务 -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 主表数据 -->
|
||||
@@ -407,6 +418,10 @@ export default {
|
||||
outStockDetailList: [],
|
||||
// 选中数据
|
||||
selectedRows: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 选中的子表数据
|
||||
selectedDetailRows: [],
|
||||
// 审核弹窗显示状态
|
||||
@@ -571,6 +586,8 @@ export default {
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 子表多选框选中数据 */
|
||||
handleDetailSelectionChange(selection) {
|
||||
@@ -690,7 +707,17 @@ export default {
|
||||
this.resetStockQuery()
|
||||
this.getStockList()
|
||||
},
|
||||
|
||||
/** 导出任务 */
|
||||
handleExportTask() {
|
||||
if (this.selectedRows.length !== 1) {
|
||||
this.$modal.msgWarning("请选择一条数据进行导出");
|
||||
return;
|
||||
}
|
||||
const stockoutId = this.selectedRows[0].stockoutId;
|
||||
this.download('/out/outStockout/export', {
|
||||
stockoutId: stockoutId
|
||||
}, `out_stockout_task_${stockoutId}_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 提交审核 */
|
||||
submitAudit() {
|
||||
this.$refs["auditForm"].validate(valid => {
|
||||
|
||||
Reference in New Issue
Block a user