This commit is contained in:
zj
2025-12-18 10:42:44 +08:00
parent e8434fa83c
commit 9c0a5c0d3e
96 changed files with 2254 additions and 1878 deletions

View File

@@ -88,12 +88,16 @@ public class ToErpServiceImpl implements IToErpService {
erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData);
RequestLog requestLog = requestLogService.getRequestLog(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
String post = requestLog.getResponseBody();
ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
if ("0".equals(bean.getStd_data().getExecution().getCode())) {
// String post = requestLog.getResponseBody();
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
// return AjaxResult.success();
// }
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
return AjaxResult.success();
}else{
return AjaxResult.error();
}
return AjaxResult.error();
}
@@ -146,11 +150,17 @@ public class ToErpServiceImpl implements IToErpService {
erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData);
RequestLog requestLog = requestLogService.getRequestLog( OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单","wms","erp");
String post = requestLog.getResponseBody();
ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
if ("0".equals(bean.getStd_data().getExecution().getCode())) {
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
return AjaxResult.success();
}else{
return AjaxResult.error();
}
return AjaxResult.error();
// String post = requestLog.getResponseBody();
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
// return AjaxResult.success();
// }
// return AjaxResult.error();
}
}

View File

@@ -35,6 +35,8 @@ import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
import com.ruoyi.log.service.IRequestLogService;
import com.ruoyi.out.outStockout.service.IOutStockoutService;
import com.ruoyi.stock.stock.domain.BasStock;
import com.ruoyi.stock.stock.service.IBasStockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -57,8 +59,6 @@ public class ToWmsServiceImpl implements IToWmsService {
private IMydoJobDetailService mydoJobDetailService;
@Autowired
private IBasContainerService basContainerService;
@Autowired
private IBasTaskNoService basTaskNoService;
@Autowired
@@ -85,6 +85,8 @@ public class ToWmsServiceImpl implements IToWmsService {
private IBasRoadwayService basRoadwayService;
@Autowired
private IRequestLogService requestLogService;
@Autowired
private IBasStockService stockService;
@Override
@@ -94,11 +96,10 @@ public class ToWmsServiceImpl implements IToWmsService {
HashMap<String, String> result = new HashMap<>();
if (StrUtil.isEmpty(requestEnter.getTrayCode())) {
return AjaxResult.error("托盘条码不能为空");
}
log.info("扫码内容{}", requestEnter.getTrayCode());
// if (StrUtil.isEmpty(requestEnter.getTrayCode())) {
// return AjaxResult.error("托盘条码不能为空");
// }
// log.info("扫码内容{}", requestEnter.getTrayCode());
//解析扫码内容
String trayCode = requestEnter.getTrayCode();
@@ -122,31 +123,41 @@ public class ToWmsServiceImpl implements IToWmsService {
log.info("二维码详情 productId:{} model:{},color:{},serial:{},v:{},hz:{},ph:{},nw:{},gw:{},erpBill:{},xh:{},jx:{},fx:{},xlh:{}", productId, model, color, serial, v, hz, ph, nw, gw, erpBill, xh, jx, fx, xlh);
for (String s : split) {
if (StrUtil.isEmpty(s)) {
return new AjaxResult(1, "二维码内容错误");
return new AjaxResult(1, "二维码内容错误!");
}
}
List<MydoJob> inList = mydoJobService.getInJobBySerial(serial);
List<BasStock> stockList = stockService.getStockBySerial(serial);
if(!CollUtil.isEmpty(inList) || !CollUtil.isEmpty(stockList)) {
return new AjaxResult(2,"该序列号已有作业或库存!");
}
//查询物料信息
BasProduct basProductParam = new BasProduct();
basProductParam.setProductId(productId);
List<BasProduct> basProducts = basProductService.selectBasProductList(basProductParam);
if (CollUtil.isEmpty(basProducts)) {
return new AjaxResult(2, "物料不存在");
return new AjaxResult(3, "物料不存在!");
}
BasProduct basProduct = basProducts.get(0);
int size = Convert.toInt(basProduct.getSpare10());
if(size == 1){
if("L1001".equals(requestEnter.getEntranceId()) || "L2004".equals(requestEnter.getEntranceId())){
return new AjaxResult(4, "入口与托盘尺寸对应错误!");
}
}
//超大托盘不处理 直接返回
if (size == 5) {
return new AjaxResult(3, "超大托盘");
return new AjaxResult(5, "超大托盘!");
}
//托盘大小与电气返回不匹配
if (StrUtil.isNotBlank(requestEnter.getSize()) && !"1".equals(requestEnter.getType()) && size != Integer.parseInt(requestEnter.getSize())) {
return new AjaxResult(4, "托盘大小不匹配");
return new AjaxResult(6, "托盘大小不匹配!");
}
String inOrOutType = null;
@@ -155,31 +166,31 @@ public class ToWmsServiceImpl implements IToWmsService {
//创建作业标准
if ("1".equals(requestEnter.getFloor())) {
//一楼入库 其它入库 和 退料入库 存在单据,需要修改单据数量
InStockin inStockinParam = new InStockin();
inStockinParam.setErpBill(erpBill);
List<InStockin> inStockins = inStockinService.selectInStockinListApi(inStockinParam);
if (CollUtil.isEmpty(inStockins)) {
return AjaxResult.error("单据不存在");
}
InStockin inStockin = inStockins.get(0);
if ("1".equals(inStockin.getStatus()) || "2".equals(inStockin.getStatus())) {
inStockin.setStatus("3");
inStockinService.updateInStockin(inStockin);
}
inOrOutType = inStockin.getInType();
inStockId = inStockin.getStockinId();
InStockinDetail inStockinDetailParam = new InStockinDetail();
inStockinDetailParam.setStockinId(inStockin.getStockinGuid());
inStockinDetailParam.setProductId(basProduct.getProductId());
List<InStockinDetail> inStockinDetails = inStockinDetailService.selectInStockinDetailList(inStockinDetailParam);
if (CollUtil.isEmpty(inStockinDetails)) {
return AjaxResult.error("单据明细不存在");
}
InStockinDetail inStockinDetail = inStockinDetails.get(0);
inStockDetailId = inStockinDetail.getStockinDetailId();
inStockinDetail.setScanNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getScanNum()).add(Convert.toBigDecimal(1))));
inStockinDetailService.updateInStockinDetail(inStockinDetail);
// InStockin inStockinParam = new InStockin();
// inStockinParam.setErpBill(erpBill);
// List<InStockin> inStockins = inStockinService.selectInStockinListApi(inStockinParam);
// if (CollUtil.isEmpty(inStockins)) {
// return AjaxResult.error("单据不存在");
// }
// InStockin inStockin = inStockins.get(0);
// if ("1".equals(inStockin.getStatus()) || "2".equals(inStockin.getStatus())) {
// inStockin.setStatus("3");
// inStockinService.updateInStockin(inStockin);
// }
// inOrOutType = inStockin.getInType();
// inStockId = inStockin.getStockinId();
// InStockinDetail inStockinDetailParam = new InStockinDetail();
// inStockinDetailParam.setStockinId(inStockin.getStockinGuid());
// inStockinDetailParam.setProductId(basProduct.getProductId());
// List<InStockinDetail> inStockinDetails = inStockinDetailService.selectInStockinDetailList(inStockinDetailParam);
// if (CollUtil.isEmpty(inStockinDetails)) {
// return AjaxResult.error("单据明细不存在");
// }
// InStockinDetail inStockinDetail = inStockinDetails.get(0);
// inStockDetailId = inStockinDetail.getStockinDetailId();
// inStockinDetail.setScanNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getScanNum()).add(Convert.toBigDecimal(1))));
// inStockinDetailService.updateInStockinDetail(inStockinDetail);
inOrOutType = "2";
}else if ("2".equals(requestEnter.getFloor())) {
inOrOutType = "1";
}
@@ -196,11 +207,11 @@ public class ToWmsServiceImpl implements IToWmsService {
BasRoadway basRoadway = basRoadwayService.selectBasRoadwayById(mydoJob.getRoadwayId());
if ("1".equals(requestEnter.getFloor())) {
if ("Y".equals(basRoadway.getInLocked())) {
return new AjaxResult(6, "巷道已锁");
return new AjaxResult(7, "巷道入库锁定!");
}
} else {
if ("Y".equals(basRoadway.getInLocked2())) {
return new AjaxResult(6, "巷道已锁");
return new AjaxResult(7, "巷道入库锁定!");
}
}
@@ -210,7 +221,7 @@ public class ToWmsServiceImpl implements IToWmsService {
basCargoSpaceParam.setRoadwayId(mydoJob.getRoadwayId());
BasCargoSpace basCargoSpace = basCargoSpaceService.selectEmptyCargoSpaceByWarehouseId(basCargoSpaceParam);
if (ObjUtil.isNull(basCargoSpace)) {
return new AjaxResult(5, "没有货位");
return new AjaxResult(8, "没有可用货位!");
}
mydoJob.setCargoSpaceId(basCargoSpace.getCargoSpaceId());
mydoJob.setEntranceId(requestEnter.getEntranceId());
@@ -254,12 +265,11 @@ public class ToWmsServiceImpl implements IToWmsService {
if ("2".equals(requestEnter.getFloor())){
AjaxResult workshopInboundOrder = toErpService.createWorkshopInboundOrder(basProduct);
if (!workshopInboundOrder.isSuccess()){
throw new RuntimeException("创建工单失败");
//throw new RuntimeException("创建工单失败");
return new AjaxResult(9, "创建工艺入库单失败!");
}
}
//修改作业状态为正执行
result.put("jobId", mydoJob.getJobId());
result.put("taskNo", mydoJob.getTaskNo());
@@ -275,8 +285,8 @@ public class ToWmsServiceImpl implements IToWmsService {
private String getRoadway(int size) {
return switch (size) {
case 1 -> "1";
case 2, 3, 4 -> "2";
case 1 -> "2";
case 2, 3, 4 -> "1";
default -> null;
};
}

View File

@@ -26,8 +26,8 @@ public class BasProduct extends BaseEntity
/** 主键 */
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 产品分类 */
@@ -74,8 +74,8 @@ public class BasProduct extends BaseEntity
@Excel(name = "功率")
private String spare6;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 相位 */

View File

@@ -104,4 +104,216 @@ Y锁、N开 */
private String spare7;
private String stockStatus;
private String productId;
private String productName;
private String spare6;
private String quantity;
public String getCargoSpaceId() {
return cargoSpaceId;
}
public void setCargoSpaceId(String cargoSpaceId) {
this.cargoSpaceId = cargoSpaceId;
}
public String getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(String warehouseId) {
this.warehouseId = warehouseId;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getRoadwayId() {
return roadwayId;
}
public void setRoadwayId(String roadwayId) {
this.roadwayId = roadwayId;
}
public String getCargoAreaId() {
return cargoAreaId;
}
public void setCargoAreaId(String cargoAreaId) {
this.cargoAreaId = cargoAreaId;
}
public String getTheType() {
return theType;
}
public void setTheType(String theType) {
this.theType = theType;
}
public String getTheTypeName() {
return theTypeName;
}
public void setTheTypeName(String theTypeName) {
this.theTypeName = theTypeName;
}
public String getCargoSpaceName() {
return cargoSpaceName;
}
public void setCargoSpaceName(String cargoSpaceName) {
this.cargoSpaceName = cargoSpaceName;
}
public Long getThePlatoon() {
return thePlatoon;
}
public void setThePlatoon(Long thePlatoon) {
this.thePlatoon = thePlatoon;
}
public Long getTheColumn() {
return theColumn;
}
public void setTheColumn(Long theColumn) {
this.theColumn = theColumn;
}
public Long getTheFloor() {
return theFloor;
}
public void setTheFloor(Long theFloor) {
this.theFloor = theFloor;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getLocked() {
return locked;
}
public void setLocked(String locked) {
this.locked = locked;
}
public String getTrayCode() {
return trayCode;
}
public void setTrayCode(String trayCode) {
this.trayCode = trayCode;
}
public String getCargoHight() {
return cargoHight;
}
public void setCargoHight(String cargoHight) {
this.cargoHight = cargoHight;
}
public String getIssDouble() {
return issDouble;
}
public void setIssDouble(String issDouble) {
this.issDouble = issDouble;
}
public String getGroupCodingNo() {
return groupCodingNo;
}
public void setGroupCodingNo(String groupCodingNo) {
this.groupCodingNo = groupCodingNo;
}
public String getGroupCoding() {
return groupCoding;
}
public void setGroupCoding(String groupCoding) {
this.groupCoding = groupCoding;
}
public String getCargoSpaceLogo() {
return cargoSpaceLogo;
}
public void setCargoSpaceLogo(String cargoSpaceLogo) {
this.cargoSpaceLogo = cargoSpaceLogo;
}
public String getThisCargoArea() {
return thisCargoArea;
}
public void setThisCargoArea(String thisCargoArea) {
this.thisCargoArea = thisCargoArea;
}
public String getSpare7() {
return spare7;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
}
public String getStockStatus() {
return stockStatus;
}
public void setStockStatus(String stockStatus) {
this.stockStatus = stockStatus;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getSpare6() {
return spare6;
}
public void setSpare6(String spare6) {
this.spare6 = spare6;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
}

View File

@@ -26,12 +26,12 @@ public class BasContainerDetails extends BaseEntity
@Excel(name = "容器编号")
private String containerId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 数量 */

View File

@@ -43,7 +43,7 @@ public class BasProductPortRel extends BaseEntity
*/
private String bindStatus;
/**
* 物料名称
* 品名
*/
private String productName;

View File

@@ -181,7 +181,7 @@ public class CheckDifferenceRecordController extends BaseController {
// 初始化extraField对象
ExtraField extraField = new ExtraField();
extraField.setProductId(record.getProductId());
// 物料名称和其他信息会通过关联查询自动填充
// 品名和其他信息会通过关联查询自动填充
newStock.setExtraField(extraField);
// 最后设置库存ID

View File

@@ -43,7 +43,7 @@ public class CheckStockinController extends BaseController
{
startPage();
List<CheckStockin> list = new ArrayList<>();
if (Convert.toInt(checkStockin.getStatus())<4){
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus())<4){
list = checkStockinService.selectCheckStockinList(checkStockin);
}else {
list = checkStockinFinishService.selectCheckStockinList(checkStockin);

View File

@@ -28,8 +28,8 @@ public class CheckStockin extends BaseEntity
@Excel(name = "盘点单据ID")
private String stockCheckId;
/** 盘库类型 */
@Excel(name = "盘库类型")
/** 盘点类型 */
@Excel(name = "盘点类型")
private String checkType;
/** 建立时间 */

View File

@@ -38,8 +38,7 @@ import java.util.List;
*/
@Service
@Slf4j
public class CheckStockinServiceImpl implements ICheckStockinService
{
public class CheckStockinServiceImpl implements ICheckStockinService {
@Autowired
private CheckStockinMapper checkStockinMapper;
@Autowired
@@ -60,8 +59,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
* @return 盘库单据主信息
*/
@Override
public CheckStockin selectCheckStockinByStockGuid(String stockGuid)
{
public CheckStockin selectCheckStockinByStockGuid(String stockGuid) {
return checkStockinMapper.selectCheckStockinByStockGuid(stockGuid);
}
@@ -73,8 +71,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
*/
@Override
@DataScope(warehouseAlias = "bw")
public List<CheckStockin> selectCheckStockinList(CheckStockin checkStockin)
{
public List<CheckStockin> selectCheckStockinList(CheckStockin checkStockin) {
return checkStockinMapper.selectCheckStockinList(checkStockin);
}
@@ -85,8 +82,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
* @return 结果
*/
@Override
public int insertCheckStockin(CheckStockin checkStockin)
{
public int insertCheckStockin(CheckStockin checkStockin) {
return checkStockinMapper.insertCheckStockin(checkStockin);
}
@@ -98,34 +94,33 @@ public class CheckStockinServiceImpl implements ICheckStockinService
*/
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult updateCheckStockin(CheckStockin checkStockin)
{
public AjaxResult updateCheckStockin(CheckStockin checkStockin) {
CheckStockin old = selectCheckStockinByStockGuid(checkStockin.getStockGuid());
if ("5".equals(checkStockin.getStatus())){
if ("5".equals(checkStockin.getStatus())) {
//作废
if (!"1".equals(old.getStatus())){
log.error("单据状态非未执行状态!");
if (!"1".equals(old.getStatus()) && !"2".equals(old.getStatus())) {
log.error("单据已执行,无法作废!");
return AjaxResult.error(MessageUtils.message("error.message21"));
}
checkStockinMapper.updateCheckStockin(checkStockin);
//插入历史单据
insertCheckStockinHistory(checkStockin);
}else if ("2".equals(checkStockin.getStatus())){
if (StrUtil.isEmpty(checkStockin.getSpare1())){
log.error("请选择出口!");
return AjaxResult.error(MessageUtils.message("error.message22"));
}
} else if ("2".equals(checkStockin.getStatus())) {
// if (StrUtil.isEmpty(checkStockin.getSpare1())){
// log.error("请选择出口!");
// return AjaxResult.error(MessageUtils.message("error.message22"));
// }
//审核
if (!"1".equals(old.getStatus())){
log.error("单据状态非未执行状态!");
if (!"1".equals(old.getStatus())) {
log.error("单据已审核!");
return AjaxResult.error(MessageUtils.message("error.message21"));
}
checkStockinMapper.updateCheckStockin(checkStockin);
}else if ("4".equals(checkStockin.getStatus())){
} else if ("4".equals(checkStockin.getStatus())) {
//确认
if (!"3".equals(old.getStatus())){
log.error("单据状态非正执行状态!");
if (!"3".equals(old.getStatus())) {
log.error("单据未执行,无需确认!");
return AjaxResult.error(MessageUtils.message("error.message23"));
}
checkStockinMapper.updateCheckStockin(checkStockin);
@@ -150,8 +145,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
* @return 结果
*/
@Override
public int deleteCheckStockinByStockGuids(String[] stockGuids)
{
public int deleteCheckStockinByStockGuids(String[] stockGuids) {
return checkStockinMapper.deleteCheckStockinByStockGuids(stockGuids);
}
@@ -162,8 +156,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
* @return 结果
*/
@Override
public int deleteCheckStockinByStockGuid(String stockGuid)
{
public int deleteCheckStockinByStockGuid(String stockGuid) {
return checkStockinMapper.deleteCheckStockinByStockGuid(stockGuid);
}
@@ -183,7 +176,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService
checkStockin.setStockSource("0");
checkStockin.setCheckType(checkStockin.getCheckType());
//checkStockin.setErpBill(checkStockin.getErpBill());
if ("1".equals(checkStockin.getCheckType())){
if ("1".equals(checkStockin.getCheckType())) {
//物料盘点
for (int i = 0; i < detailList.size(); i++) {
CheckStockinDetail checkStockinDetail = detailList.get(i);
@@ -197,21 +190,20 @@ public class CheckStockinServiceImpl implements ICheckStockinService
// checkStockinDetail.
checkStockinDetailService.insertCheckStockinDetail(checkStockinDetail);
}
}else if ("2".equals(checkStockin.getCheckType())){
} else if ("2".equals(checkStockin.getCheckType())) {
//货位盘点
for (int i = 0; i < detailList.size(); i++) {
BasStock param = new BasStock();
param.setCargoSpaceId(detailList.get(i).getSpare1());
List<BasStock> basStocks = basStockService.selectBasStockList(param);
Integer quantity = 0;
for (BasStock basStock : basStocks) {
quantity += Convert.toInt(basStock.getQuantity());
}
// BasStock param = new BasStock();
// param.setCargoSpaceId(detailList.get(i).getSpare1());
// List<BasStock> basStocks = basStockService.selectBasStockList(param);
// Integer quantity = 0;
// for (BasStock basStock : basStocks) {
// quantity += Convert.toInt(basStock.getQuantity());
// }
CheckStockinDetail checkStockinDetail = detailList.get(i);
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
checkStockinDetail.setStockCheckId(stockCheckId);
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
checkStockinDetail.setQuantity(quantity.toString());
checkStockinDetail.setScanNum("0");
checkStockinDetail.setAssignNum("0");
checkStockinDetailService.insertCheckStockinDetail(checkStockinDetail);
@@ -225,18 +217,21 @@ public class CheckStockinServiceImpl implements ICheckStockinService
@Override
public AjaxResult autoAllocation(CheckStockin checkStockin) {
CheckStockin currentCheckStock = selectCheckStockinByStockGuid(checkStockin.getStockGuid());
if (ObjUtil.isNull(currentCheckStock)){
log.warn("单据不存在! stockGudi:{}",checkStockin.getStockGuid());
if (ObjUtil.isNull(currentCheckStock)) {
log.warn("单据不存在! stockGudi:{}", checkStockin.getStockGuid());
return AjaxResult.error(MessageUtils.message("error.message27"));
}
HashMap<String, String> map = new HashMap<>();
map.put("v_stock_check_id", currentCheckStock.getStockCheckId());
checkStockinMapper.autoAllot(map);
iToWcsService.pushOutMydoJob();
if ("10".equals(map.get("v_result"))){
return AjaxResult.success();
}else {
return AjaxResult.warn(map.get("v_resultmsg"));
List<CheckStockinDetail> list = checkStockinDetailService.getCheckDetailById(currentCheckStock.getStockCheckId());
StringBuilder builder = new StringBuilder();
for (CheckStockinDetail checkStockinDetail : list) {
map.put("v_stock_check_detail_id", checkStockinDetail.getStockCheckDetailId());
checkStockinMapper.autoAllot(map);
builder.append("行明细:" + checkStockinDetail.getStockCheckDetailId() + ",分配结果:" + map.get("v_resultmsg") + "<br />");
}
iToWcsService.pushOutMydoJob();
return AjaxResult.success(builder.toString());
}
}

View File

@@ -43,8 +43,8 @@ public class CheckStockinDetail extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -64,4 +64,6 @@ public interface CheckStockinDetailMapper
void insertCheckStockinDetailHistory(CheckStockin checkStockin);
void deleteCheckStockinDetailByStockinGuid(String stockGuid);
List<CheckStockinDetail> getCheckDetailById(String stockCheckId);
}

View File

@@ -64,4 +64,6 @@ public interface ICheckStockinDetailService
void insertCheckStockinDetailHistory(CheckStockin checkStockin);
void deleteCheckStockinDetailByStockinGuid(String stockGuid);
List<CheckStockinDetail> getCheckDetailById(String stockCheckId);
}

View File

@@ -102,4 +102,9 @@ public class CheckStockinDetailServiceImpl implements ICheckStockinDetailService
public void deleteCheckStockinDetailByStockinGuid(String stockGuid) {
checkStockinDetailMapper.deleteCheckStockinDetailByStockinGuid(stockGuid);
}
@Override
public List<CheckStockinDetail> getCheckDetailById(String stockCheckId) {
return checkStockinDetailMapper.getCheckDetailById(stockCheckId);
}
}

View File

@@ -34,8 +34,8 @@ public class CheckStockinDetailFinish extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -22,8 +22,8 @@ public class CheckStockinFinish extends BaseEntity
@Excel(name = "盘点单据ID")
private String stockCheckId;
/** 盘库类型 */
@Excel(name = "盘库类型")
/** 盘点类型 */
@Excel(name = "盘点类型")
private String checkType;
/** 建立时间 */

View File

@@ -102,9 +102,18 @@ public class InStockin extends BaseEntity
private String lotNo;
private String materialDesc;
private String startDate;
private List<String> typeData;
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public List<String> getTypeData() {
return typeData;
}
@@ -353,26 +362,34 @@ public class InStockin extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockinGuid", getStockinGuid())
.append("stockinId", getStockinId())
.append("inType", getInType())
.append("createDate", getCreateDate())
.append("createManId", getCreateManId())
.append("status", getStatus())
.append("warehouseId", getWarehouseId())
.append("finishDate", getFinishDate())
.append("erpBill", getErpBill())
.append("stockSource", getStockSource())
.append("departmentNo", getDepartmentNo())
.append("customerNo", getCustomerNo())
.append("classNo", getClassNo())
.append("supplierNo", getSupplierNo())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare4", getSpare4())
.append("spare3", getSpare3())
.append("spare5", getSpare5())
.toString();
return "InStockin{" +
"stockinGuid='" + stockinGuid + '\'' +
", stockinId='" + stockinId + '\'' +
", inType='" + inType + '\'' +
", createDate='" + createDate + '\'' +
", createManId='" + createManId + '\'' +
", createManName='" + createManName + '\'' +
", status='" + status + '\'' +
", warehouseId='" + warehouseId + '\'' +
", warehouseName='" + warehouseName + '\'' +
", finishDate='" + finishDate + '\'' +
", erpBill='" + erpBill + '\'' +
", stockSource='" + stockSource + '\'' +
", departmentNo='" + departmentNo + '\'' +
", departmentName='" + departmentName + '\'' +
", customerNo='" + customerNo + '\'' +
", classNo='" + classNo + '\'' +
", supplierNo='" + supplierNo + '\'' +
", supplierName='" + supplierName + '\'' +
", spare1='" + spare1 + '\'' +
", spare2='" + spare2 + '\'' +
", spare4='" + spare4 + '\'' +
", spare3='" + spare3 + '\'' +
", spare5='" + spare5 + '\'' +
", lotNo='" + lotNo + '\'' +
", materialDesc='" + materialDesc + '\'' +
", startDate='" + startDate + '\'' +
", typeData=" + typeData +
'}';
}
}

View File

@@ -41,10 +41,10 @@ public class InStockinDetail extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
@Excel(name = "物料名称")
@Excel(name = "品名")
private String productName;
/** 计划数量 */

View File

@@ -41,8 +41,8 @@ public class InStockinDetailFinish extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -40,8 +40,8 @@ public class InMydoJobController extends BaseController
{
startPage();
List<MydoJob> list = null;
//mydoJob.setInOut("1");
if(Integer.parseInt(mydoJob.getStatus())<4) {
// mydoJob.setInOut("1");
if(mydoJob.getStatus() == null || Integer.parseInt(mydoJob.getStatus())<4) {
list = mydoJobService.selectMydoJobList(mydoJob);
}else{
list= mydoJobFinishService.selectMydoJobFinishListByMydoJob(mydoJob);

View File

@@ -36,7 +36,7 @@ public class OutMydoJobController extends BaseController {
{
startPage();
List<MydoJob> list;
if(Integer.parseInt(mydoJob.getStatus())<4) {
if(mydoJob.getStatus() == null || Integer.parseInt(mydoJob.getStatus())<4) {
list = mydoJobService.selectMydoJobList(mydoJob);
}else{
list=mydoJobFinishService.selectMydoJobFinishListByMydoJob(mydoJob);

View File

@@ -95,8 +95,6 @@ public class MydoJob extends BaseEntity
@Excel(name = "任务类型",dictType = "in_or_out_type")
private String inOrOut;
/** 开始时间 */
@Excel(name = "开始时间")
private String startTime;

View File

@@ -74,4 +74,6 @@ public interface MydoJobMapper
MydoJob selectByTrayCode(String trayCode);
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
List<MydoJob> getInJobBySerial(String trayCode);
}

View File

@@ -107,4 +107,6 @@ public interface IMydoJobService
MydoJob selectMydoJobByTrayCode(String trayCode);
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
List<MydoJob> getInJobBySerial(String serial);
}

View File

@@ -313,13 +313,13 @@ public class MydoJobServiceImpl implements IMydoJobService {
if (CollUtil.isNotEmpty(mydoJobDetails)) {
List<BasStock> list = new ArrayList<>();
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
if ("2".equals(mydoJob.getInOrOut()) || "3".equals(mydoJob.getInOrOut())) {
//修改单据实际数量 2-退料入库 3-其它入库
String inOrOutDId = mydoJobDetail.getInOrOutDId();
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
inStockinDetailService.updateInStockinDetail(inStockinDetail);
}
// if ("2".equals(mydoJob.getInOrOut()) || "3".equals(mydoJob.getInOrOut())) {
// //修改单据实际数量 2-退料入库 3-其它入库
// String inOrOutDId = mydoJobDetail.getInOrOutDId();
// InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
// inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
// inStockinDetailService.updateInStockinDetail(inStockinDetail);
// }
//正常库存
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("0");
@@ -504,4 +504,9 @@ public class MydoJobServiceImpl implements IMydoJobService {
public MydoJob selectMydoJobByEntranceId(MydoJob mydoJob) {
return mydoJobMapper.selectMydoJobByEntranceId(mydoJob);
}
@Override
public List<MydoJob> getInJobBySerial(String trayCode) {
return mydoJobMapper.getInJobBySerial(trayCode);
}
}

View File

@@ -54,10 +54,10 @@ public class MydoJobDetail extends BaseEntity
@Excel(name = "物料GUID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
@Excel(name = "物料名称")
@Excel(name = "品名")
private String productName;
/** 库存状态 */

View File

@@ -47,8 +47,8 @@ public class MydoJobDetailFinish extends BaseEntity
@Excel(name = "物料GUID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 库存状态 */

View File

@@ -438,7 +438,7 @@ public class KpiServiceImpl implements KpiService
StringBuilder info = new StringBuilder();
// 拼接货位信息
info.append("货位名称:").append(space.getCargoSpaceName()).append("<br>");
// info.append("货位名称:").append(space.getCargoSpaceName()).append("<br>");
info.append("是否锁定:").append("Y".equals(space.getLocked()) ? "是" : "否").append("<br>");
info.append("托盘条码:").append(space.getTrayCode() != null ? space.getTrayCode() : "无").append("<br>");
@@ -448,8 +448,8 @@ public class KpiServiceImpl implements KpiService
List<BasStock> stockList = basStockMapper.selectBasStockList(stockQuery);
if (!stockList.isEmpty()) {
BasStock stock = stockList.get(0);
info.append("物料编码:").append(stock.getProductId() != null ? stock.getProductId() : "无").append("<br>");
info.append("物料名称:").append(stock.getProductName() != null ? stock.getProductName() : "无").append("<br>");
info.append("品号:").append(stock.getProductId() != null ? stock.getProductId() : "无").append("<br>");
info.append("品名:").append(stock.getProductName() != null ? stock.getProductName() : "无").append("<br>");
}
response.put("msg", info.toString());

View File

@@ -164,6 +164,10 @@ public class ViewHandAllotStock extends BaseEntity
@Excel(name = "货位名称")
private String cargoSpaceName;
private Integer thePlatoon;
private Integer theColumn;
private Integer theFloor;
public void setStockId(String stockId)
{
this.stockId = stockId;
@@ -534,46 +538,73 @@ public class ViewHandAllotStock extends BaseEntity
return cargoSpaceName;
}
public Integer getThePlatoon() {
return thePlatoon;
}
public void setThePlatoon(Integer thePlatoon) {
this.thePlatoon = thePlatoon;
}
public Integer getTheColumn() {
return theColumn;
}
public void setTheColumn(Integer theColumn) {
this.theColumn = theColumn;
}
public Integer getTheFloor() {
return theFloor;
}
public void setTheFloor(Integer theFloor) {
this.theFloor = theFloor;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockId", getStockId())
.append("cargoSpaceId", getCargoSpaceId())
.append("stockStatus", getStockStatus())
.append("productStatus", getProductStatus())
.append("lotNo", getLotNo())
.append("inDate", getInDate())
.append("backDate", getBackDate())
.append("productGuid", getProductGuid())
.append("quantity", getQuantity())
.append("jobId", getJobId())
.append("trayCode", getTrayCode())
.append("outQuantity", getOutQuantity())
.append("stockinDetailId", getStockinDetailId())
.append("stockinId", getStockinId())
.append("inType", getInType())
.append("inClassId", getInClassId())
.append("warehouseId", getWarehouseId())
.append("stackingId", getStackingId())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("productId", getProductId())
.append("productName", getProductName())
.append("voltage", getVoltage())
.append("power", getPower())
.append("phase", getPhase())
.append("netWeight", getNetWeight())
.append("grossWeight", getGrossWeight())
.append("distribution", getDistribution())
.append("model", getModel())
.append("orderId", getOrderId())
.append("spare7", getSpare7())
.append("spare8", getSpare8())
.append("cargoSpaceName", getCargoSpaceName())
.toString();
return "ViewHandAllotStock{" +
"stockId='" + stockId + '\'' +
", cargoSpaceId='" + cargoSpaceId + '\'' +
", stockStatus='" + stockStatus + '\'' +
", productStatus='" + productStatus + '\'' +
", lotNo='" + lotNo + '\'' +
", inDate='" + inDate + '\'' +
", backDate='" + backDate + '\'' +
", productGuid='" + productGuid + '\'' +
", quantity=" + quantity +
", jobId='" + jobId + '\'' +
", trayCode='" + trayCode + '\'' +
", outQuantity='" + outQuantity + '\'' +
", stockinDetailId='" + stockinDetailId + '\'' +
", stockinId='" + stockinId + '\'' +
", inType='" + inType + '\'' +
", inClassId='" + inClassId + '\'' +
", warehouseId='" + warehouseId + '\'' +
", stackingId='" + stackingId + '\'' +
", spare1='" + spare1 + '\'' +
", spare2='" + spare2 + '\'' +
", spare3='" + spare3 + '\'' +
", spare4='" + spare4 + '\'' +
", spare5='" + spare5 + '\'' +
", spare6='" + spare6 + '\'' +
", productId='" + productId + '\'' +
", productName='" + productName + '\'' +
", voltage='" + voltage + '\'' +
", power='" + power + '\'' +
", phase='" + phase + '\'' +
", netWeight=" + netWeight +
", grossWeight=" + grossWeight +
", distribution='" + distribution + '\'' +
", model='" + model + '\'' +
", orderId='" + orderId + '\'' +
", spare7='" + spare7 + '\'' +
", spare8='" + spare8 + '\'' +
", cargoSpaceName='" + cargoSpaceName + '\'' +
", thePlatoon=" + thePlatoon +
", theColumn=" + theColumn +
", theFloor=" + theFloor +
'}';
}
}

View File

@@ -30,7 +30,7 @@ public class OutStockoutController extends BaseController {
@Autowired
private IOutStockoutService outStockoutService;
@Autowired
private IOutStockoutFinishService outStockoutFinishService;
private IOutStockoutFinishService outStockoutFinishService;
/**
* 查询出库主单列表
@@ -40,10 +40,10 @@ public class OutStockoutController extends BaseController {
public TableDataInfo list(OutStockout outStockout) {
startPage();
List<OutStockout> list = new ArrayList<>();
if(Integer.parseInt(outStockout.getStatus())<4){
list =outStockoutService.selectOutStockoutList(outStockout);
}else{
list=outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout);
if (outStockout.getStatus() == null || (outStockout.getStatus() != null &&Integer.parseInt(outStockout.getStatus()) < 4)) {
list = outStockoutService.selectOutStockoutList(outStockout);
} else {
list = outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout);
}
return getDataTable(list);
}
@@ -121,13 +121,14 @@ public class OutStockoutController extends BaseController {
@Log(title = "出库主单状态改变", businessType = BusinessType.OTHER)
@RequestMapping("/changeStatus")
@ResponseBody
public String changeStatus(@RequestParam("stockoutIds") String[] stockoutIds, @RequestParam("status") String status,@RequestParam("newStatus")String newStatus,@RequestParam(value = "exitId",required = false)String exitId) {
String s = outStockoutService.updateOutStockoutStatus(stockoutIds, status, newStatus,exitId);
public String changeStatus(@RequestParam("stockoutIds") String[] stockoutIds, @RequestParam("status") String status, @RequestParam("newStatus") String newStatus, @RequestParam(value = "exitId", required = false) String exitId) {
String s = outStockoutService.updateOutStockoutStatus(stockoutIds, status, newStatus, exitId);
return s;
}
/**
* 自动出库
*
* @param stockoutId
* @return
*/

View File

@@ -38,8 +38,8 @@ public class OutStockoutDetail extends BaseEntity
@Excel(name = "物资guid")
private String productGuid;
/** 物资编码 */
@Excel(name = "物资编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */
@@ -122,8 +122,8 @@ public class OutStockoutDetail extends BaseEntity
@Excel(name = "规格 SPEC")
private String spec;
/** 物资名称 ASMAT_NAME */
// @Excel(name = "物资名称 ASMAT_NAME")
/** 品名 ASMAT_NAME */
// @Excel(name = "品名 ASMAT_NAME")
private String productName;
/** 供应商代码 SUPPLIER_CODE */

View File

@@ -37,8 +37,8 @@ public class OutStockoutDetailFinish extends BaseEntity
@Excel(name = "物资guid")
private String productGuid;
/** 物资编码 */
@Excel(name = "物资编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -30,8 +30,8 @@ public class OutPickSubmit extends BaseEntity
@Excel(name = "子任务id")
private String jobDetailId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料数量 */

View File

@@ -18,11 +18,11 @@ public class ReceiveProductVo {
@Excel(name = "子件")
private String subItem;
@Excel(name = "物料编码")
@Excel(name = "品号")
@NotEmpty(message = "物料GUID不能为空")
private String productId;
@Excel(name = "物料描述")
@Excel(name = "品名")
private String materialDesc;
@Excel(name = "英文描述")

View File

@@ -41,8 +41,8 @@ public class ReceiveStockinDetail extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -34,8 +34,8 @@ public class ReceiveStockinDetailFinish extends BaseEntity
@Excel(name = "物料ID")
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 计划数量 */

View File

@@ -27,12 +27,12 @@ public class StockSummary extends BaseEntity
@Excel(name = "订单号")
private String orderId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 规格 */

View File

@@ -40,7 +40,7 @@ public class ViewFlatWarehouseInFlow extends BaseEntity
@Excel(name = "${search.ViewFlatWarehouseInFlow.productId}")
private String productId;
/** 物料名称 */
/** 品名 */
@Excel(name = "${search.ViewFlatWarehouseInFlow.productName}")
private String productName;

View File

@@ -40,7 +40,7 @@ public class ViewFlatWarehouseOutFlow extends BaseEntity
@Excel(name = "${search.ViewFlatWarehouseOutFlow.productId}")
private String productId;
/** 物料名称 */
/** 品名 */
@Excel(name = "${search.ViewFlatWarehouseOutFlow.productName}")
private String productName;

View File

@@ -41,12 +41,12 @@ public class ViewInJobFlow extends BaseEntity
@Excel(name = "订单号")
private String lineId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 品名 */
@Excel(name = "物料名称")
@Excel(name = "品名")
private String productName;
/** 巷道ID */

View File

@@ -38,12 +38,12 @@ public class ViewOutJobFlow extends BaseEntity
@Excel(name = "订单号")
private String lineId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 品名 */
@Excel(name = "物料名称")
@Excel(name = "品名")
private String productName;
/** 托盘码 */

View File

@@ -32,12 +32,12 @@ public class ViewStockDetail extends BaseEntity
@Excel(name = "订单号")
private String orderId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 货位ID */

View File

@@ -49,11 +49,11 @@ public class ViewStockinHistory extends BaseEntity
@Excel(name = "订单号")
private String erpBill;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 供应商名称 */
@Excel(name = "供应商名称")

View File

@@ -49,12 +49,12 @@ public class ViewStockoutHistory extends BaseEntity
@Excel(name = "订单号")
private String erpStockoutId;
/** 物料编码 */
@Excel(name = "物料编码")
/** 品号 */
@Excel(name = "品号")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
/** 品名 */
@Excel(name = "品名")
private String productName;
/** 出口 */

View File

@@ -55,8 +55,8 @@ public class BasStock extends BaseEntity
//额外字段
@Excels({
@Excel(name = "${stock.BasStock.productId}", targetAttr = "productId"),// 物料编码
@Excel(name = "${stock.BasStock.materialDesc}", targetAttr = "materialDesc"),// 物料描述
@Excel(name = "${stock.BasStock.productId}", targetAttr = "productId"),// 品号
@Excel(name = "${stock.BasStock.materialDesc}", targetAttr = "materialDesc"),// 品名
@Excel(name = "${stock.BasStock.englishDesc}", targetAttr = "englishDesc"),//物料英文描述
@Excel(name = "${stock.BasStock.netWeight}", targetAttr = "netWeight"),//净重
@Excel(name = "${stock.BasStock.length}",targetAttr = "length"),//长度
@@ -66,11 +66,11 @@ public class BasStock extends BaseEntity
})
private ExtraField extraField;
/** 物料编码 */
/** 品号 */
// @Excel(name = "${stock.BasStock.productId}")
private String productId;
//物料描述
//品名
// @Excel(name = "${stock.BasStock.materialDesc}")
private String materialDesc;
@@ -177,8 +177,8 @@ public class BasStock extends BaseEntity
private String spare4;
//物料名称
// @Excel(name = "物料名称")
//品名
// @Excel(name = "品名")
private String productName;
private List<String> typeData;

View File

@@ -68,4 +68,6 @@ public interface BasStockMapper
int updateStockStatusByTrayCode(@Param("stockStatus") String stockStatus,@Param("trayCode") String trayCode);
void resetPdRecord();
List<BasStock> getStockBySerial(String trayCode);
}

View File

@@ -81,4 +81,6 @@ public interface IBasStockService
List<BasStock> selectKtpStock(BasStock basStock);
AjaxResult resetPdRecord();
List<BasStock> getStockBySerial(String serial);
}

View File

@@ -189,6 +189,11 @@ public class BasStockServiceImpl implements IBasStockService
return AjaxResult.success();
}
@Override
public List<BasStock> getStockBySerial(String trayCode) {
return basStockMapper.getStockBySerial(trayCode);
}
/**
* 新增库存信息(不记录维护记录)
*

View File

@@ -25,6 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="groupCoding" column="group_coding" />
<result property="cargoSpaceLogo" column="cargo_space_logo" />
<result property="thisCargoArea" column="this_cargo_area" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="quantity" column="quantity" />
</resultMap>
<sql id="selectBasCargoSpaceVo">
@@ -191,34 +196,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY the_platoon, the_floor,the_column
</select>
<select id="selectBasCargoSpaceListByRoadway" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
select bcs.cargo_space_id, bcs.warehouse_id, bw.warehouse_name, bcs.roadway_id, bcs.cargo_area_id, bcs.the_type,
bcs.the_type_name, bcs.cargo_space_name, bcs.the_platoon, bcs.the_column, bcs.the_floor, bcs.status, bcs.locked,
bcs.tray_code, bcs.cargo_hight, bcs.iss_double, bcs.group_coding_no, bcs.group_coding, bcs.cargo_space_logo,
bcs.this_cargo_area
from bas_cargo_space bcs
left join bas_warehouse bw on bw.warehouse_id = bcs.warehouse_id
left join bas_roadway br on br.roadway_id = bcs.roadway_id
left join bas_stock bs on bs.cargo_space_id = bcs.cargo_space_id
left join bas_product bp on bp.product_id = bs.product_id
where br.out_locked = 'N'
select bcs.cargo_space_id, bcs.warehouse_id, bcs.roadway_id, bcs.cargo_space_name,
bcs.the_platoon, bcs.the_column, bcs.the_floor, bcs.status, bcs.locked, bs.tray_code, bs.product_id,
bp.product_name,bs.spare6,bs.quantity,bs.spare7
from bas_stock bs,bas_cargo_space bcs,bas_roadway br,bas_product bp
where bs.cargo_space_id = bcs.cargo_space_id
and br.roadway_id = bcs.roadway_id
and bp.product_id = bs.product_id
and br.out_locked = 'N'
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="trayCode != null and trayCode != ''"> and bs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
<if test="spare6 != null and spare6 != ''"> and bs.spare6 like concat('%', #{spare6}, '%')</if>
<if test="productId != null and productId != ''"> and bs.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
</select>
</mapper>

View File

@@ -230,4 +230,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteCheckStockinDetailByStockinGuid">
delete from check_stockin_detail where stock_check_guid = #{stockCheckGuid}
</delete>
<select id="getCheckDetailById" parameterType="String" resultMap="CheckStockinDetailResult">
select * from check_stockin_detail where stock_check_id = #{stockCheckId}
</select>
</mapper>

View File

@@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="autoAllot" parameterType="java.util.Map" statementType="CALLABLE">
{
call proc_check_auto_allocation(
#{v_stock_check_id,mode=IN,jdbcType=VARCHAR},
#{v_stock_check_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)

View File

@@ -70,7 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createManId != null and createManId != ''"> and is2.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and is2.status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and is2.warehouse_id = #{warehouseId}</if>
<if test="finishDate != null and finishDate != ''"> and is2.finish_date = #{finishDate}</if>
<if test="startDate != null and startDate != ''"> and is2.create_date &gt;= #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and is2.create_date &lt;= #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and is2.erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and is2.stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and is2.department_no = #{departmentNo}</if>

View File

@@ -113,18 +113,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
<if test="departmentId != null and departmentId != ''"> and mj.department_id = #{departmentId}</if>
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
<if test="trayCode != null and trayCode != ''"> and mj.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and mj.target_roadway_id = #{targetRoadwayId}</if>
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and mj.target_cargo_space_id = #{targetCargoSpaceId}</if>
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
<if test="lineId != null and lineId != ''"> and mj.line_id like concat('%', #{lineId}, '%') </if>
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
<if test="priority != null "> and mj.priority = #{priority}</if>
<if test="executionPhase != null and executionPhase != ''"> and mj.execution_phase = #{executionPhase}</if>
<if test="inOrOut != null and inOrOut != ''"> and mj.in_or_out = #{inOrOut}</if>
<if test="startTime != null and startTime != ''"> and mj.start_time like concat('%', #{startTime}, '%')</if>
<if test="finishTime != null and finishTime != ''"> and mj.finish_time like concat('%', #{finishTime}, '%')</if>
<if test="startTime != null and startTime != ''"> and mj.create_time &gt;= #{startTime}</if>
<if test="finishTime != null and finishTime != ''"> and mj.create_time &lt;= #{finishTime}</if>
<if test="entranceId != null and entranceId != ''"> and mj.entrance_id = #{entranceId}</if>
<if test="exitId != null and exitId != ''"> and mj.exit_id = #{exitId}</if>
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
@@ -134,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out &lt; 20 and mj.in_or_out not in(5,6)</if>
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
<if test="productId != null and productId != ''"> and mj.job_id in (select job_id from mydo_job_detail where product_id like concat('%', #{productId}, '%'))</if>
<if test = "inOutIds !=null and inOutIds.size() > 0">
and mj.in_or_out in
<foreach item="item" index="index" collection="inOutIds" separator="," open="(" close=")">

View File

@@ -67,18 +67,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
<if test="departmentId != null and departmentId != ''"> and mj.department_id = #{departmentId}</if>
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
<if test="trayCode != null and trayCode != ''"> and mj.tray_code like concat('%',#{trayCode},'%')</if>
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and mj.target_roadway_id = #{targetRoadwayId}</if>
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and mj.target_cargo_space_id = #{targetCargoSpaceId}</if>
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
<if test="lineId != null and lineId != ''"> and mj.line_id like concat('%', #{lineId}, '%') </if>
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
<if test="priority != null "> and mj.priority = #{priority}</if>
<if test="executionPhase != null and executionPhase != ''"> and mj.execution_phase = #{executionPhase}</if>
<if test="inOrOut != null and inOrOut != ''"> and mj.in_or_out = #{inOrOut}</if>
<if test="startTime != null and startTime != ''"> and mj.start_time like concat('%', #{startTime}, '%')</if>
<if test="finishTime != null and finishTime != ''"> and mj.finish_time like concat('%', #{finishTime}, '%')</if>
<if test="startTime != null and startTime != ''"> and mj.create_time &gt;= #{startTime}</if>
<if test="finishTime != null and finishTime != ''"> and mj.create_time &lt;= #{finishTime}</if>
<if test="entranceId != null and entranceId != ''"> and mj.entrance_id like concat('%',#{entranceId},'%')</if>
<if test="exitId != null and exitId != ''"> and mj.exit_id like concat('%', #{exitId}, '%')</if>
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
@@ -88,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out &lt; 20 and mj.in_or_out not in(5,6)</if>
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
<if test="productId != null and productId != ''"> and mj.job_id in (select job_id from mydo_job_detail where product_id like concat('%', #{productId}, '%'))</if>
<if test = "inOutIds !=null and inOutIds.size() > 0">
and mj.in_or_out in
<foreach item="item" index="index" collection="inOutIds" separator="," open="(" close=")">
@@ -236,4 +237,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
order by mj.create_time
</select>
<select id="getInJobBySerial" parameterType="String" resultMap="MydoJobResult">
select * from mydo_job where tray_code=#{trayCode}
</select>
</mapper>

View File

@@ -45,7 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectViewHandAllotStockVo">
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name from view_hand_allot_stock
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid,
quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id,
warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name,
voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8,
cargo_space_name from view_hand_allot_stock
</sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
@@ -56,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="inDate != null and inDate != ''"> and in_date like concat('%', #{inDate}, '%')</if>
<if test="backDate != null and backDate != ''"> and back_date = #{backDate}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
@@ -75,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
@@ -85,10 +89,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null and thePlatoon != ''"> and cargo_space_id in (select cargo_space_id from bas_cargo_space where the_platoon=#{thePlatoon})</if>
<if test="theColumn != null and theColumn != ''"> and cargo_space_id in (select cargo_space_id from bas_cargo_space where the_column=#{theColumn})</if>
<if test="theFloor != null and theFloor != ''"> and cargo_space_id in (select cargo_space_id from bas_cargo_space where the_floor=#{theFloor})</if>
</where>
</select>

View File

@@ -31,15 +31,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock
</sql>
<sql id="selectViewProductAndStockPdVo">
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock_pd
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7 from view_product_and_stock_pd
</sql>
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
@@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
<if test="power != null and power != ''"> and power = #{power}</if>
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
@@ -67,11 +68,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectViewProductAndStockPdVo"/>
<where>
<if test="onlyIdentity != null ">and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''">and product_id = #{productId}</if>
<if test="lotNo != null and lotNo != ''">and lot_no = #{lotNo}</if>
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
'%')
</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null ">and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''">and warehouse_id = #{warehouseId}</if>
<if test="spare1 != null and spare1 != ''">and spare1 = #{spare1}</if>

View File

@@ -244,4 +244,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by b.the_platoon,b.the_floor,b.the_column asc
</select>
<select id="getStockBySerial" parameterType="String" resultMap="BasStockResult">
select * from bas_stock where tray_code = #{trayCode}
</select>
</mapper>