no message
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.checkout.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.annotation.Log;
|
||||||
|
import org.nl.wms.pda.checkout.service.CheckOutService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ldjun
|
||||||
|
* @date 2021-07-26
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "手持托盘入窑贵州")
|
||||||
|
@RequestMapping("/api/pda/ruleSetting")
|
||||||
|
@Slf4j
|
||||||
|
public class CheckOutController {
|
||||||
|
|
||||||
|
private final CheckOutService checkOutService;
|
||||||
|
|
||||||
|
@PostMapping("/queryInfoBycode")
|
||||||
|
@Log("根据托盘号查询库存信息")
|
||||||
|
@ApiOperation("根据托盘号查询库存信息")
|
||||||
|
public ResponseEntity<Object> queryInfoBycode(@RequestBody Map<String, String> param) {
|
||||||
|
return new ResponseEntity<>(checkOutService.queryInfoBycode(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
@Log("出库确定")
|
||||||
|
@ApiOperation("出库确定")
|
||||||
|
public ResponseEntity<Object> Confirm(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(checkOutService.Confirm(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.nl.wms.pda.checkout.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface CheckOutService {
|
||||||
|
Map<String, Object> queryInfoBycode(Map<String,String> jsonObject);
|
||||||
|
/**
|
||||||
|
* 盘点单确认
|
||||||
|
* @param param 条件
|
||||||
|
* @return Map<String,Object>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Map<String, Object> Confirm( JSONObject param);
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package org.nl.wms.pda.checkout.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.exception.BadRequestException;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.WorkProcedureEnum;
|
||||||
|
import org.nl.wms.pda.checkout.service.CheckOutService;
|
||||||
|
import org.nl.wms.sch.manage.AreaEnum;
|
||||||
|
import org.nl.wms.sch.manage.BillTypeEnum;
|
||||||
|
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
|
||||||
|
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
||||||
|
import org.nl.wql.WQL;
|
||||||
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class CheckOutServiceImpl implements CheckOutService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryInfoBycode(Map<String, String> jsonObject) {
|
||||||
|
String vehicle_code = jsonObject.get("vehicle_code");
|
||||||
|
if (StrUtil.isEmpty(vehicle_code)) {
|
||||||
|
throw new BadRequestException("托盘号不能为空!");
|
||||||
|
}
|
||||||
|
JSONObject resutl = WQL.getWO("QPADSERVICE").addParam("flag", "17").process().uniqueResult(0);
|
||||||
|
JSONObject returnjo = new JSONObject();
|
||||||
|
returnjo.put("code", "1");
|
||||||
|
returnjo.put("desc", "查询成功!");
|
||||||
|
returnjo.put("result", resutl);
|
||||||
|
return returnjo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> Confirm( JSONObject param) {
|
||||||
|
|
||||||
|
String point_id = param.getString("point_id");
|
||||||
|
String point_code = param.getString("point_code");
|
||||||
|
String lock_type = WQLObject.getWQLObject("sch_base_point").query("point_id='" + point_id + "'").uniqueResult(0).getString("lock_type");
|
||||||
|
if (StrUtil.equals(lock_type, "01")) {
|
||||||
|
throw new BadRequestException("点位为'" + point_code + "'已锁定,不能出库");
|
||||||
|
}
|
||||||
|
WQLObject ivtTable = WQLObject.getWQLObject("st_ivt_structivt");
|
||||||
|
JSONObject ivtObj = ivtTable.query("struct_id = '" + point_id + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(ivtObj)){
|
||||||
|
throw new BadRequestException("未找到库存信息");
|
||||||
|
}
|
||||||
|
//创建人工出库单据
|
||||||
|
//创建出库单据
|
||||||
|
JSONObject iosObj = new JSONObject();
|
||||||
|
String iostorinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||||
|
iosObj.put("iostorinv_id", iostorinv_id);
|
||||||
|
iosObj.put("bill_code", CodeUtil.getNewCode("OUT_STORE_CODE"));
|
||||||
|
iosObj.put("io_type", "1");
|
||||||
|
iosObj.put("bill_type", BillTypeEnum.FJCK.getCode());
|
||||||
|
iosObj.put("workprocedure_id", WorkProcedureEnum.FJGX.getId());
|
||||||
|
iosObj.put("ivt_workprocedure_id", ivtObj.getString("workprocedure_id"));
|
||||||
|
iosObj.put("material_id", ivtObj.getString("material_id"));
|
||||||
|
iosObj.put("vehicle_code", ivtObj.getString("vehicle_code"));
|
||||||
|
iosObj.put("producetask_id", ivtObj.getString("producetask_id"));
|
||||||
|
iosObj.put("qty",ivtObj.getString("canuse_qty") );
|
||||||
|
//默认是完成分配状态
|
||||||
|
iosObj.put("bill_status", "50");
|
||||||
|
iosObj.put("start_point_code", point_code);
|
||||||
|
iosObj.put("end_point_code", "");
|
||||||
|
iosObj.put("start_area", AreaEnum.CYHCHJ.getCode());
|
||||||
|
iosObj.put("end_area", "");
|
||||||
|
iosObj.put("create_mode", "01");
|
||||||
|
iosObj.put("task_id", "");
|
||||||
|
iosObj.put("remark", "手持人工出库!");
|
||||||
|
iosObj.put("create_id", SecurityUtils.getCurrentUserId());
|
||||||
|
iosObj.put("create_name", SecurityUtils.getNickName());
|
||||||
|
iosObj.put("create_time", DateUtil.now());
|
||||||
|
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj);
|
||||||
|
//清除库存
|
||||||
|
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
||||||
|
param.put("material_id", ivtObj.getString("material_id"));
|
||||||
|
param.put("bill_id", iostorinv_id);
|
||||||
|
param.put("change_qty", ivtObj.getString("canuse_qty"));
|
||||||
|
param.put("vehicle_code", ivtObj.getString("vehicle_code"));
|
||||||
|
param.put("workprocedure_id", ivtObj.getString("ivt_workprocedure_id"));
|
||||||
|
param.put("struct_id",point_id);
|
||||||
|
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
|
||||||
|
JSONObject returnjo = new JSONObject();
|
||||||
|
returnjo.put("code", "1");
|
||||||
|
returnjo.put("desc", "操作成功!");
|
||||||
|
return returnjo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
package org.nl.wms.pda.ruleSetting.rest;
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.outstruct.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.outstruct.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.outstruct.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.outstruct.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.ruleSetting.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.outstruct.rest;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.annotation.Log;
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
import org.nl.wms.pda.ruleSetting.service.PdaRuleSettingService;
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.ruleSetting.service.PdaRuleSettingService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ldjun
|
|
||||||
* @date 2021-07-26
|
|
||||||
**/
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Api(tags = "手持托盘入窑贵州")
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
@RequestMapping("/api/pda/ruleSetting")
|
|
||||||
@Slf4j
|
|
||||||
public class PdaRuleSettingController {
|
|
||||||
|
|
||||||
private final PdaRuleSettingService pdaBindingService;
|
|
||||||
|
|
||||||
@PostMapping("/queryInfo")
|
|
||||||
@Log("查询规则信息")
|
|
||||||
@ApiOperation("查询规则信息")
|
|
||||||
public ResponseEntity<Object> queryInfo(@RequestBody Map<String, String> param) {
|
|
||||||
return new ResponseEntity<>(pdaBindingService.queryInfo(param), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
@PostMapping("/confirm")
|
|
||||||
@Log("规则确定")
|
|
||||||
@ApiOperation("规则确定")
|
|
||||||
public ResponseEntity<Object> Confirm(@RequestBody JSONObject param) {
|
|
||||||
return new ResponseEntity<>(pdaBindingService.Confirm(param), HttpStatus.OK);
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
@RequestMapping("/api/pda/outStruct")
|
|
||||||
@Slf4j
|
|
||||||
public class OutStructController {
|
|
||||||
|
|
||||||
private final OutStructService outStructService;
|
|
||||||
|
|
||||||
@PostMapping("/queryInfoBycode")
|
|
||||||
@Log("根据托盘号查询库存信息")
|
|
||||||
@ApiOperation("根据托盘号查询库存信息")
|
|
||||||
public ResponseEntity<Object> queryInfoBycode(@RequestBody Map<String, String> param) {
|
|
||||||
return new ResponseEntity<>(outStructService.queryInfoBycode(param), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
|
||||||
@Log("出库确定")
|
|
||||||
@ApiOperation("出库确定")
|
|
||||||
public ResponseEntity<Object> Confirm(@RequestBody JSONObject param) {
|
|
||||||
return new ResponseEntity<>(outStructService.Confirm(param), HttpStatus.OK);
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
package org.nl.wms.pda.ruleSetting.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface PdaRuleSettingService {
|
|
||||||
Map<String, Object> queryInfo(Map<String,String> jsonObject);
|
|
||||||
/**
|
|
||||||
* 盘点单确认
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
package org.nl.wms.pda.outstruct.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface OutStructService {
|
|
||||||
Map<String, Object> queryInfoBycode(Map<String,String> jsonObject);
|
|
||||||
/**
|
|
||||||
* 出库确定
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
* @param param 条件
|
|
||||||
* @return Map<String,Object>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Map<String, Object> Confirm( JSONObject param);
|
|
||||||
}
|
|
||||||
@@ -1,293 +0,0 @@
|
|||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
package org.nl.wms.pda.ruleSetting.service.impl;
|
|
||||||
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
package org.nl.wms.pda.outstruct.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
package org.nl.wms.pda.ruleSetting.service.impl;
|
|
||||||
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
import org.nl.modules.system.service.UserService;
|
|
||||||
import org.nl.wms.database.service.MaterialService;
|
|
||||||
import org.nl.wms.pda.exception.PdaRequestException;
|
|
||||||
import org.nl.wms.pda.ruleSetting.service.PdaRuleSettingService;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
import org.nl.exception.BadRequestException;
|
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
|
||||||
import org.nl.utils.SecurityUtils;
|
|
||||||
import org.nl.wms.WorkProcedureEnum;
|
|
||||||
import org.nl.wms.pda.outstruct.service.OutStructService;
|
|
||||||
import org.nl.wms.sch.manage.AreaEnum;
|
|
||||||
import org.nl.wms.sch.manage.BillTypeEnum;
|
|
||||||
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
|
|
||||||
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
|
|
||||||
import org.nl.wql.WQL;
|
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Slf4j
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
public class PdaRuleSettingServiceImpl implements PdaRuleSettingService {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryInfo(Map<String, String> jsonObject) {
|
|
||||||
String mode = jsonObject.get("mode");
|
|
||||||
//1 为入 2 为出
|
|
||||||
JSONArray arr = new JSONArray();
|
|
||||||
JSONObject infojo = new JSONObject();
|
|
||||||
//1 启用 0 停用
|
|
||||||
String is_used = "";
|
|
||||||
if (StrUtil.equals("1", mode)) {
|
|
||||||
arr = WQLObject.getWQLObject("st_rule_cacheline").query("1=1", "in_seq_no ").getResultJSONArray(0);
|
|
||||||
is_used = WQLObject.getWQLObject("sys_param").query("code='is_inrule'").uniqueResult(0).getString("value");
|
|
||||||
} else {
|
|
||||||
arr = WQLObject.getWQLObject("st_rule_cacheline").query("1=1", "out_seq_no ").getResultJSONArray(0);
|
|
||||||
is_used = WQLObject.getWQLObject("sys_param").query("code='is_outrule'").uniqueResult(0).getString("value");
|
|
||||||
}
|
|
||||||
infojo.put("is_used", is_used);
|
|
||||||
infojo.put("JSONArray", arr);
|
|
||||||
JSONObject returnjo = new JSONObject();
|
|
||||||
returnjo.put("code", "1");
|
|
||||||
returnjo.put("desc", "查询成功!");
|
|
||||||
returnjo.put("result", infojo);
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
public class OutStructServiceImpl implements OutStructService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> queryInfoBycode(Map<String, String> jsonObject) {
|
|
||||||
String vehicle_code = jsonObject.get("vehicle_code");
|
|
||||||
if (StrUtil.isEmpty(vehicle_code)) {
|
|
||||||
throw new BadRequestException("托盘号不能为空!");
|
|
||||||
}
|
|
||||||
JSONObject resutl = WQL.getWO("QPADSERVICE").addParam("flag", "17").process().uniqueResult(0);
|
|
||||||
JSONObject returnjo = new JSONObject();
|
|
||||||
returnjo.put("code", "1");
|
|
||||||
returnjo.put("desc", "查询成功!");
|
|
||||||
returnjo.put("result", resutl);
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
return returnjo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
public Map<String, Object> Confirm( JSONObject param) {
|
|
||||||
String mode =(String) param.get("mode");
|
|
||||||
String is_used = (String)param.get("is_used");
|
|
||||||
JSONArray arr = param.getJSONArray("JSONArray");
|
|
||||||
|
|
||||||
WQLObject paramTable = WQLObject.getWQLObject("sys_param");
|
|
||||||
WQLObject ruleTable = WQLObject.getWQLObject("st_rule_cacheline");
|
|
||||||
if (StrUtil.equals(mode, "1")) {
|
|
||||||
JSONObject paramObj = paramTable.query("code='is_inrule'").uniqueResult(0);
|
|
||||||
paramObj.put("value", is_used);
|
|
||||||
paramTable.update(paramObj);
|
|
||||||
for (int i = 0; i < arr.size(); i++) {
|
|
||||||
JSONObject joo = arr.getJSONObject(i);
|
|
||||||
joo.put("in_seq_no",i);
|
|
||||||
ruleTable.update(joo);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
JSONObject paramObj = paramTable.query("code='is_outrule'").uniqueResult(0);
|
|
||||||
paramObj.put("value", is_used);
|
|
||||||
paramTable.update(paramObj);
|
|
||||||
for (int i = 0; i < arr.size(); i++) {
|
|
||||||
JSONObject joo = arr.getJSONObject(i);
|
|
||||||
joo.put("out_seq_no",i);
|
|
||||||
ruleTable.update(joo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
public Map<String, Object> Confirm(JSONObject param) {
|
|
||||||
|
|
||||||
String point_id = param.getString("point_id");
|
|
||||||
String point_code = param.getString("point_code");
|
|
||||||
String lock_type = WQLObject.getWQLObject("sch_base_point").query("point_id='" + point_id + "'").uniqueResult(0).getString("lock_type");
|
|
||||||
if (StrUtil.equals(lock_type, "01")) {
|
|
||||||
throw new BadRequestException("点位为'" + point_code + "'已锁定,不能出库");
|
|
||||||
}
|
|
||||||
WQLObject ivtTable = WQLObject.getWQLObject("st_ivt_structivt");
|
|
||||||
JSONObject ivtObj = ivtTable.query("struct_id = '" + point_id + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(ivtObj)){
|
|
||||||
throw new BadRequestException("未找到库存信息");
|
|
||||||
}
|
|
||||||
//创建人工出库单据
|
|
||||||
//创建出库单据
|
|
||||||
JSONObject iosObj = new JSONObject();
|
|
||||||
String iostorinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
|
||||||
iosObj.put("iostorinv_id", iostorinv_id);
|
|
||||||
iosObj.put("bill_code", CodeUtil.getNewCode("OUT_STORE_CODE"));
|
|
||||||
iosObj.put("io_type", "1");
|
|
||||||
iosObj.put("bill_type", BillTypeEnum.FJCK.getCode());
|
|
||||||
iosObj.put("workprocedure_id", WorkProcedureEnum.FJGX.getId());
|
|
||||||
iosObj.put("ivt_workprocedure_id", ivtObj.getString("workprocedure_id"));
|
|
||||||
iosObj.put("material_id", ivtObj.getString("material_id"));
|
|
||||||
iosObj.put("vehicle_code", ivtObj.getString("vehicle_code"));
|
|
||||||
iosObj.put("producetask_id", ivtObj.getString("producetask_id"));
|
|
||||||
iosObj.put("qty",ivtObj.getString("canuse_qty") );
|
|
||||||
//默认是完成分配状态
|
|
||||||
iosObj.put("bill_status", "50");
|
|
||||||
iosObj.put("start_point_code", point_code);
|
|
||||||
iosObj.put("end_point_code", "");
|
|
||||||
iosObj.put("start_area", AreaEnum.CYHCHJ.getCode());
|
|
||||||
iosObj.put("end_area", "");
|
|
||||||
iosObj.put("create_mode", "01");
|
|
||||||
iosObj.put("task_id", "");
|
|
||||||
iosObj.put("remark", "手持人工出库!");
|
|
||||||
iosObj.put("create_id", SecurityUtils.getCurrentUserId());
|
|
||||||
iosObj.put("create_name", SecurityUtils.getNickName());
|
|
||||||
iosObj.put("create_time", DateUtil.now());
|
|
||||||
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj);
|
|
||||||
//清除库存
|
|
||||||
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
|
||||||
param.put("material_id", ivtObj.getString("material_id"));
|
|
||||||
param.put("bill_id", iostorinv_id);
|
|
||||||
param.put("change_qty", ivtObj.getString("canuse_qty"));
|
|
||||||
param.put("vehicle_code", ivtObj.getString("vehicle_code"));
|
|
||||||
param.put("workprocedure_id", ivtObj.getString("ivt_workprocedure_id"));
|
|
||||||
param.put("struct_id",point_id);
|
|
||||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
|
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
JSONObject returnjo = new JSONObject();
|
|
||||||
returnjo.put("code", "1");
|
|
||||||
returnjo.put("desc", "操作成功!");
|
|
||||||
return returnjo;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user