Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -16,6 +16,8 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,4 +92,11 @@ public class StructivtController {
|
|||||||
return new ResponseEntity<>(structivtService.getUnits(),HttpStatus.OK);
|
return new ResponseEntity<>(structivtService.getUnits(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("导出数据")
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||||
|
structivtService.download(map, response);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import org.nl.wms.basedata.st.service.dto.StructivtDto;
|
import org.nl.wms.basedata.st.service.dto.StructivtDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -69,4 +71,6 @@ public interface StructivtService {
|
|||||||
JSONObject getStructById(JSONObject param);
|
JSONObject getStructById(JSONObject param);
|
||||||
|
|
||||||
JSONArray getUnits();
|
JSONArray getUnits();
|
||||||
|
|
||||||
|
void download(Map map, HttpServletResponse response) throws IOException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.common.utils.FileUtil;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wms.basedata.st.service.StructivtService;
|
import org.nl.wms.basedata.st.service.StructivtService;
|
||||||
@@ -24,6 +25,10 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -168,4 +173,68 @@ public class StructivtServiceImpl implements StructivtService {
|
|||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||||
|
String material = MapUtil.getStr(whereJson, "material");
|
||||||
|
String struct = MapUtil.getStr(whereJson, "struct");
|
||||||
|
String stor_id = MapUtil.getStr(whereJson, "stor_id");
|
||||||
|
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||||
|
String sap_pcsn = MapUtil.getStr(whereJson, "sap_pcsn");
|
||||||
|
String package_box_sn = MapUtil.getStr(whereJson, "package_box_sn");
|
||||||
|
String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name");
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("stor_id", stor_id);
|
||||||
|
if (StrUtil.isNotEmpty(material)) {
|
||||||
|
map.put("material", "%" + material + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(struct)) {
|
||||||
|
map.put("struct", "%" + struct + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(pcsn)) {
|
||||||
|
map.put("pcsn", "%" + pcsn + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(sap_pcsn)) {
|
||||||
|
map.put("sap_pcsn", "%" + sap_pcsn + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(package_box_sn)) {
|
||||||
|
map.put("package_box_sn", "%" + package_box_sn + "%");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(sale_order_name)) {
|
||||||
|
map.put("sale_order_name", "%" + sale_order_name + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取人员对应的仓库
|
||||||
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
|
String in_stor_id = userStorService.getInStor();
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id",in_stor_id);
|
||||||
|
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < resultJSONArray.size(); i++) {
|
||||||
|
JSONObject json = resultJSONArray.getJSONObject(i);
|
||||||
|
Map<String, Object> mp = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
mp.put("仓位编码", json.getString("struct_code"));
|
||||||
|
mp.put("仓位名称", json.getString("struct_name"));
|
||||||
|
mp.put("仓库", json.getString("stor_name"));
|
||||||
|
mp.put("库区", json.getString("sect_name"));
|
||||||
|
mp.put("物料编码", json.getString("material_code"));
|
||||||
|
mp.put("物料名称", json.getString("material_name"));
|
||||||
|
mp.put("木箱码", json.getString("package_box_sn"));
|
||||||
|
mp.put("子卷号", json.getString("pcsn"));
|
||||||
|
mp.put("sap批次", json.getString("sap_pcsn"));
|
||||||
|
mp.put("可用数", json.getString("canuse_qty"));
|
||||||
|
mp.put("冻结数", json.getString("frozen_qty"));
|
||||||
|
mp.put("库存数", json.getString("ivt_qty"));
|
||||||
|
mp.put("待入数", json.getString("warehousing_qty"));
|
||||||
|
mp.put("计量单位", json.getString("unit_name"));
|
||||||
|
mp.put("入库时间", json.getString("instorage_time"));
|
||||||
|
list.add(mp);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,4 +84,11 @@ public class LmsToMesController {
|
|||||||
public ResponseEntity<Object> childRollFGOutboundComplete(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> childRollFGOutboundComplete(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(lmsToMesService.childRollFGOutboundComplete(jo), HttpStatus.OK);
|
return new ResponseEntity<>(lmsToMesService.childRollFGOutboundComplete(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/LMSUnPackakge")
|
||||||
|
@Log("拆箱入库回传mes箱号、子卷号")
|
||||||
|
@ApiOperation("拆箱入库回传mes箱号、子卷号")
|
||||||
|
public ResponseEntity<Object> LmsSunPackage(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(lmsToMesService.LmsSunPackage(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,15 @@ public interface LmsToMesService {
|
|||||||
*/
|
*/
|
||||||
JSONObject childRollFGOutboundComplete(JSONObject param);
|
JSONObject childRollFGOutboundComplete(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拆箱入库:回传mes箱号、子卷号
|
||||||
|
* 参数:
|
||||||
|
* {
|
||||||
|
* PackageBoxSN: 箱号
|
||||||
|
* Details: [
|
||||||
|
* {ContainerName: 子卷号}
|
||||||
|
* ]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
JSONObject LmsSunPackage(JSONObject jo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,6 +466,50 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BadRequestException("MES提示错误:"+e.getMessage());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拆箱入库:回传mes箱号、子卷号
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@LokiLog(type = LokiLogType.LMS_TO_MES)
|
||||||
|
@Override
|
||||||
|
public JSONObject LmsSunPackage(JSONObject param) {
|
||||||
|
log.info("LMSUnPackakge接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
result.put("message", "下发成功,但未连接MES!");
|
||||||
|
result.put("data", new JSONObject());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray list = new JSONArray();
|
||||||
|
|
||||||
|
// String url = acsUrl + api;
|
||||||
|
String url = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
|
String api = "CamstarApi/LMSUnPackakge";
|
||||||
|
url = url + api;
|
||||||
|
try {
|
||||||
|
String resultMsg = HttpRequest.post(url)
|
||||||
|
.body(String.valueOf(param))
|
||||||
|
.execute().body();
|
||||||
|
result = JSONObject.parseObject(resultMsg);
|
||||||
|
log.info("LMSUnPackakge接口输出参数为:-------------------" + result.toString());
|
||||||
|
|
||||||
|
|
||||||
|
String RTYPE = result.getString("RTYPE");
|
||||||
|
if (RTYPE.equals("E")){
|
||||||
|
throw new BadRequestException(result.getString("RTMSG"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BadRequestException("MES提示错误:"+e.getMessage());
|
throw new BadRequestException("MES提示错误:"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class PrintServiceImpl implements PrintService {
|
|||||||
//保质期
|
//保质期
|
||||||
String quality_guaran_period = box_jo.getString("quality_guaran_period");
|
String quality_guaran_period = box_jo.getString("quality_guaran_period");
|
||||||
//检验员
|
//检验员
|
||||||
String nspector = "";
|
String nspector = "1";
|
||||||
//储存条件
|
//储存条件
|
||||||
String storage_conditions = "";
|
String storage_conditions = "";
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
FROM
|
FROM
|
||||||
st_ivt_iostorinvdis dis
|
st_ivt_iostorinvdis dis
|
||||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no AND sub.container_name = dis.pcsn
|
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn
|
||||||
LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code
|
LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code
|
||||||
WHERE
|
WHERE
|
||||||
mst.bill_type = '1005'
|
mst.bill_type = '1005'
|
||||||
|
|||||||
@@ -1569,20 +1569,20 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
|
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
|
||||||
JSONArray table = new JSONArray(); // 明细参数
|
|
||||||
mapParam.put("bill_status", "10");
|
|
||||||
mapParam.put("bill_type", "21");
|
|
||||||
mapParam.put("buss_type", "21");
|
|
||||||
mapParam.put("biz_date", DateUtil.today());
|
|
||||||
mapParam.put("stor_code", "CP01");
|
|
||||||
mapParam.put("stor_id", "1582991156504039424");
|
|
||||||
mapParam.put("stor_name", "成品仓库");
|
|
||||||
mapParam.put("is_task", "1");
|
|
||||||
|
|
||||||
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
||||||
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
||||||
|
|
||||||
|
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
||||||
|
JSONArray table = new JSONArray(); // 明细参数
|
||||||
|
mapParam.put("bill_status", "10");
|
||||||
|
mapParam.put("bill_type", "21");
|
||||||
|
mapParam.put("buss_type", "21");
|
||||||
|
mapParam.put("biz_date", DateUtil.today());
|
||||||
|
mapParam.put("stor_code", "CP01");
|
||||||
|
mapParam.put("stor_id", "1582991156504039424");
|
||||||
|
mapParam.put("stor_name", "成品仓库");
|
||||||
|
mapParam.put("is_task", "1");
|
||||||
|
|
||||||
// 查询移入货位
|
// 查询移入货位
|
||||||
JSONObject moveParam = new JSONObject();
|
JSONObject moveParam = new JSONObject();
|
||||||
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
||||||
@@ -1636,12 +1636,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
||||||
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
||||||
wo_Task.update(jsonTaskMove);
|
wo_Task.update(jsonTaskMove);
|
||||||
|
|
||||||
|
mapParam.put("tableData", table);
|
||||||
|
// 调用移库单新增方法
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
|
||||||
|
handMoveStorService.insertDtl2(mapParam);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mapParam.put("tableData", table);
|
|
||||||
// 调用移库单新增方法
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
|
|
||||||
handMoveStorService.insertDtl2(mapParam);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
@@ -1686,20 +1688,20 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
|
||||||
JSONArray table = new JSONArray(); // 明细参数
|
|
||||||
mapParam.put("bill_status", "10");
|
|
||||||
mapParam.put("bill_type", "21");
|
|
||||||
mapParam.put("buss_type", "21");
|
|
||||||
mapParam.put("biz_date", DateUtil.today());
|
|
||||||
mapParam.put("stor_code", "CP01");
|
|
||||||
mapParam.put("stor_id", "1582991156504039424");
|
|
||||||
mapParam.put("stor_name", "成品仓库");
|
|
||||||
mapParam.put("is_task", "1");
|
|
||||||
|
|
||||||
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
||||||
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
||||||
|
|
||||||
|
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
||||||
|
JSONArray table = new JSONArray(); // 明细参数
|
||||||
|
mapParam.put("bill_status", "10");
|
||||||
|
mapParam.put("bill_type", "21");
|
||||||
|
mapParam.put("buss_type", "21");
|
||||||
|
mapParam.put("biz_date", DateUtil.today());
|
||||||
|
mapParam.put("stor_code", "CP01");
|
||||||
|
mapParam.put("stor_id", "1582991156504039424");
|
||||||
|
mapParam.put("stor_name", "成品仓库");
|
||||||
|
mapParam.put("is_task", "1");
|
||||||
|
|
||||||
// 查询移入货位
|
// 查询移入货位
|
||||||
JSONObject moveParam = new JSONObject();
|
JSONObject moveParam = new JSONObject();
|
||||||
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
||||||
@@ -1753,11 +1755,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
||||||
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
||||||
wo_Task.update(jsonTaskMove);
|
wo_Task.update(jsonTaskMove);
|
||||||
}
|
|
||||||
mapParam.put("tableData", table);
|
mapParam.put("tableData", table);
|
||||||
// 调用移库单新增方法
|
// 调用移库单新增方法
|
||||||
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
|
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
|
||||||
handMoveStorService.insertDtl2(mapParam);
|
handMoveStorService.insertDtl2(mapParam);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 下发
|
// 下发
|
||||||
|
|||||||
@@ -374,6 +374,8 @@
|
|||||||
OPTION 输入.bill_status <> ""
|
OPTION 输入.bill_status <> ""
|
||||||
dis.work_status <= 输入.bill_status
|
dis.work_status <= 输入.bill_status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
order by dis.struct_code ASC
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -124,6 +124,26 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 拆分入库:回传mes
|
||||||
|
if (StrUtil.equals(bill_type, "0005")) {
|
||||||
|
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
JSONArray details = new JSONArray();
|
||||||
|
|
||||||
|
for (int j = 0; j < disArr.size(); j++) {
|
||||||
|
JSONObject json = disArr.getJSONObject(j);
|
||||||
|
param.put("PackageBoxSN", json.getString("box_no"));
|
||||||
|
|
||||||
|
JSONObject jsonParamDtl = new JSONObject();
|
||||||
|
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||||
|
|
||||||
|
details.add(jsonParamDtl);
|
||||||
|
}
|
||||||
|
param.put("Details", details);
|
||||||
|
new LmsToMesServiceImpl().LmsSunPackage(param);
|
||||||
|
}
|
||||||
|
|
||||||
// 销售出库
|
// 销售出库
|
||||||
if (StrUtil.equals(bill_type, "1001") && is_productstore.equals("1")) {
|
if (StrUtil.equals(bill_type, "1001") && is_productstore.equals("1")) {
|
||||||
// 2.回传mes
|
// 2.回传mes
|
||||||
@@ -580,7 +600,28 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jo_mst.put("upload_time", DateUtil.now());
|
jo_mst.put("upload_time", DateUtil.now());
|
||||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
||||||
}
|
}
|
||||||
// 销售出库
|
|
||||||
|
// 拆分入库:回传mes
|
||||||
|
if (StrUtil.equals(bill_type, "0005")) {
|
||||||
|
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
JSONArray details = new JSONArray();
|
||||||
|
|
||||||
|
for (int j = 0; j < disArr.size(); j++) {
|
||||||
|
JSONObject json = disArr.getJSONObject(j);
|
||||||
|
param.put("PackageBoxSN", json.getString("box_no"));
|
||||||
|
|
||||||
|
JSONObject jsonParamDtl = new JSONObject();
|
||||||
|
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||||
|
|
||||||
|
details.add(jsonParamDtl);
|
||||||
|
}
|
||||||
|
param.put("Details", details);
|
||||||
|
new LmsToMesServiceImpl().LmsSunPackage(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销售出库
|
||||||
if (StrUtil.equals(bill_type, "1001")) {
|
if (StrUtil.equals(bill_type, "1001")) {
|
||||||
// 1.回传sap
|
// 1.回传sap
|
||||||
JSONArray paramSapMstArr = new JSONArray();
|
JSONArray paramSapMstArr = new JSONArray();
|
||||||
|
|||||||
@@ -92,7 +92,18 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
@click="downdtl"
|
||||||
|
>
|
||||||
|
导出Excel
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
@@ -134,6 +145,8 @@ import pagination from '@crud/Pagination'
|
|||||||
import crudPoint from '@/views/wms/sch/point/point'
|
import crudPoint from '@/views/wms/sch/point/point'
|
||||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
import { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
const defaultForm = { stockrecord_id: null, cascader: null, struct_id: null, struct_code: null, struct_name: null, workprocedure_id: null, material_id: null, material_code: null, quality_scode: null, pcsn: null, canuse_qty: null, frozen_qty: null, ivt_qty: null, warehousing_qty: null, qty_unit_id: null, instorage_time: null, sale_id: null }
|
const defaultForm = { stockrecord_id: null, cascader: null, struct_id: null, struct_code: null, struct_name: null, workprocedure_id: null, material_id: null, material_code: null, quality_scode: null, pcsn: null, canuse_qty: null, frozen_qty: null, ivt_qty: null, warehousing_qty: null, qty_unit_id: null, instorage_time: null, sale_id: null }
|
||||||
export default {
|
export default {
|
||||||
@@ -177,6 +190,18 @@ export default {
|
|||||||
},
|
},
|
||||||
hand(value) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
downdtl() {
|
||||||
|
if (this.currentRow !== null) {
|
||||||
|
crud.downloadLoading = true
|
||||||
|
download('/api/structivt/download', this.crud.query).then(result => {
|
||||||
|
debugger
|
||||||
|
downloadFile(result, '成品库存', 'xlsx')
|
||||||
|
crud.downloadLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
crud.downloadLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user