Merge remote-tracking branch 'origin/feature/NoScanning' into feature/NoScanning
This commit is contained in:
commit
863bea8b94
|
|
@ -661,6 +661,7 @@ public class InProduceOrderController extends BaseController {
|
||||||
materialNos.add(it.getMaterialNo());
|
materialNos.add(it.getMaterialNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
noScanningBaseControllerService.qrCodeCreateTask(it.getMaterialNo(), it.getFactoryNo(), it.getWarehouseNo());
|
||||||
});
|
});
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||||
.throwMessage("以下物料的扫码数量与收货数量不一致:" + StrUtil.join(",", materialNos));
|
.throwMessage("以下物料的扫码数量与收货数量不一致:" + StrUtil.join(",", materialNos));
|
||||||
|
|
|
||||||
|
|
@ -315,6 +315,7 @@ public class InProduceOrderSurplusController extends BaseController {
|
||||||
.setCreateTime(Instant.now())
|
.setCreateTime(Instant.now())
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
noScanningBaseControllerService.qrCodeCreateTask(item.getMatnr(), order.getDwerk(), order.getLgort2());
|
||||||
});
|
});
|
||||||
inProduceOrderSurplusItemService.updateBatchById(datas);
|
inProduceOrderSurplusItemService.updateBatchById(datas);
|
||||||
inMaterialScanRecordRespository.saveAll(records);
|
inMaterialScanRecordRespository.saveAll(records);
|
||||||
|
|
|
||||||
|
|
@ -971,6 +971,7 @@ public class NormalPGIController extends BaseController {
|
||||||
.setFLAG("")
|
.setFLAG("")
|
||||||
.setSERNR(qrCodeMaster.getSerialNo()));
|
.setSERNR(qrCodeMaster.getSerialNo()));
|
||||||
});
|
});
|
||||||
|
noScanningBaseControllerService.qrCodeCreateTask(item.getItemCode(), wmsPoReceipt.getFactoryCode(), item.getReceivedWarehouse());
|
||||||
}
|
}
|
||||||
normalPGIControllerService.takeDeliveryConfirm(receiptItems, inventories, zwm3A17DTOS, request.getTaskId());
|
normalPGIControllerService.takeDeliveryConfirm(receiptItems, inventories, zwm3A17DTOS, request.getTaskId());
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
|
|
|
||||||
|
|
@ -858,6 +858,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(Instant.now())
|
.setCreateTime(Instant.now())
|
||||||
);
|
);
|
||||||
|
noScanningBaseControllerService.qrCodeCreateTask(record.getMaterialNo(), ticket.getWerks(), request.getWarehouseNo());
|
||||||
});
|
});
|
||||||
qrCodeMasters.stream()
|
qrCodeMasters.stream()
|
||||||
.filter(p -> p.getPackagingType() == 1)
|
.filter(p -> p.getPackagingType() == 1)
|
||||||
|
|
|
||||||
|
|
@ -848,6 +848,7 @@ public class TransferFactoryController extends BaseController {
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(Instant.now())
|
.setCreateTime(Instant.now())
|
||||||
);
|
);
|
||||||
|
noScanningBaseControllerService.qrCodeCreateTask(record.getMaterialNo(), ticket.getWerks(), request.getWarehouseNo());
|
||||||
});
|
});
|
||||||
qrCodeMasters.stream()
|
qrCodeMasters.stream()
|
||||||
.filter(p -> p.getPackagingType() == 1)
|
.filter(p -> p.getPackagingType() == 1)
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
package com.nflg.wms.admin.service;
|
package com.nflg.wms.admin.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
||||||
|
import com.nflg.wms.common.constant.Constant;
|
||||||
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
|
import com.nflg.wms.repository.entity.QmsTodoItem;
|
||||||
|
import com.nflg.wms.repository.entity.User;
|
||||||
import com.nflg.wms.repository.entity.WmsInventory;
|
import com.nflg.wms.repository.entity.WmsInventory;
|
||||||
import com.nflg.wms.repository.entity.WmsQrCodeMaster;
|
import com.nflg.wms.repository.entity.WmsQrCodeMaster;
|
||||||
import com.nflg.wms.repository.service.IWmsInventoryService;
|
import com.nflg.wms.repository.service.*;
|
||||||
import com.nflg.wms.repository.service.IWmsQrCodeMasterService;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class NoScanningBaseControllerService {
|
public class NoScanningBaseControllerService {
|
||||||
|
|
||||||
|
|
@ -19,6 +27,18 @@ public class NoScanningBaseControllerService {
|
||||||
@Resource
|
@Resource
|
||||||
private IWmsInventoryService inventoryService;
|
private IWmsInventoryService inventoryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsTodoItemService todoItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BasdeSerialNumberControllerService basdeSerialNumberControllerService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDictionaryItemService dictionaryItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IRoleService roleService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料是否生成过二维码
|
* 物料是否生成过二维码
|
||||||
* @param materialNo 物料编号
|
* @param materialNo 物料编号
|
||||||
|
|
@ -32,7 +52,7 @@ public class NoScanningBaseControllerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean cannotOutNoScanning(String materialNo, String factoryNo, String warehouseNo) {
|
public boolean cannotOutNoScanning(String materialNo, String factoryNo, String warehouseNo) {
|
||||||
if (!existsQrCode(materialNo)){
|
if (existsQrCode(materialNo)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !quantityConsistencyCheck(materialNo, factoryNo, warehouseNo);
|
return !quantityConsistencyCheck(materialNo, factoryNo, warehouseNo);
|
||||||
|
|
@ -40,8 +60,8 @@ public class NoScanningBaseControllerService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料库存和物料二维码数量一致性检查
|
* 物料库存和物料二维码数量一致性检查
|
||||||
* @param materialNo 物料编号
|
* @param materialNo 物料编号
|
||||||
* @param factoryNo 工厂编号
|
* @param factoryNo 工厂编号
|
||||||
* @param warehouseNo 仓库编号
|
* @param warehouseNo 仓库编号
|
||||||
* @return 数量是否一致
|
* @return 数量是否一致
|
||||||
*/
|
*/
|
||||||
|
|
@ -71,13 +91,29 @@ public class NoScanningBaseControllerService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建仓库管理员补码任务
|
* 创建仓库管理员补码任务
|
||||||
* @param materialNo 物料编号
|
* @param materialNo 物料编号
|
||||||
* @param factoryNo 工厂编号
|
* @param factoryNo 工厂编号
|
||||||
* @param warehouseNo 仓库编号
|
* @param warehouseNo 仓库编号
|
||||||
*/
|
*/
|
||||||
public void qrCodeCreateTask(String materialNo,String factoryNo, String warehouseNo){
|
public void qrCodeCreateTask(String materialNo, String factoryNo, String warehouseNo) {
|
||||||
if (!quantityConsistencyCheck(materialNo, factoryNo, warehouseNo)) {
|
if (!quantityConsistencyCheck(materialNo, factoryNo, warehouseNo)) {
|
||||||
//TODO 给仓库负责人创建补码的待办任务
|
List<User> users = roleService.getUsersByCode(Constant.ROLE_CODE_CANGKUGUANLIYUAN);
|
||||||
|
if (CollectionUtil.isEmpty(users)) {
|
||||||
|
log.error("未设置仓库管理员,无法通知补码");
|
||||||
|
} else {
|
||||||
|
users.forEach(user -> {
|
||||||
|
todoItemService.add(new QmsTodoItem()
|
||||||
|
.setTitle("物料" + materialNo + "需要补码")
|
||||||
|
.setCode(basdeSerialNumberControllerService.generateSerialNumber(44))
|
||||||
|
.setSourceTypeId(dictionaryItemService.getIdByCode("MessageType", "MaterialQrCodeAdd"))
|
||||||
|
.setSourceId(0L)
|
||||||
|
.setRemark(materialNo)
|
||||||
|
.setCreateUserId(user.getId())
|
||||||
|
.setCreateUserName(user.getUserName())
|
||||||
|
.setCreateTime(LocalDateTime.now())
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@ public class QmsTodoItem implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Boolean isRead;
|
private Boolean isRead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人ID
|
* 创建人ID
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -202,10 +202,10 @@ public class SRMController extends BaseController {
|
||||||
inspect.setReceiveQty(inspect.getQualifiedQty());
|
inspect.setReceiveQty(inspect.getQualifiedQty());
|
||||||
log.info("质检合格, 质检单号: {}, 合格数量: {}", data.getInspectionNum(), data.getQualifiedQty());
|
log.info("质检合格, 质检单号: {}, 合格数量: {}", data.getInspectionNum(), data.getQualifiedQty());
|
||||||
|
|
||||||
// 如果物料有二维码,则直接入库(参考NormalPGIController.takeDeliveryConfirm方法)
|
// 如果物料没有生成过二维码,则直接入库(参考NormalPGIController.takeDeliveryConfirm方法)
|
||||||
if (hasQrCode) {
|
if (!hasQrCode) {
|
||||||
inspect.setIsIn(true);
|
inspect.setIsIn(true);
|
||||||
log.info("物料有二维码, 执行直接入库, 质检单号: {}", data.getInspectionNum());
|
log.info("物料没有生成过二维码, 执行直接入库, 质检单号: {}", data.getInspectionNum());
|
||||||
|
|
||||||
// 构建库存入库数据
|
// 构建库存入库数据
|
||||||
InventoryInDTO inventoryDTO = new InventoryInDTO()
|
InventoryInDTO inventoryDTO = new InventoryInDTO()
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public class DeployDevTest {
|
||||||
//处理主jar包
|
//处理主jar包
|
||||||
handleFile(sshUtil, localPath + jarName, remotePath + jarName);
|
handleFile(sshUtil, localPath + jarName, remotePath + jarName);
|
||||||
//处理lib目录
|
//处理lib目录
|
||||||
handleDir(sshUtil, localPath, remotePath, "lib");
|
// handleDir(sshUtil, localPath, remotePath, "lib");
|
||||||
//执行脚本启动服务
|
//执行脚本启动服务
|
||||||
sshUtil.exec("cd " + remotePath + " && ./restart.sh");
|
sshUtil.exec("cd " + remotePath + " && ./restart.sh");
|
||||||
sshUtil.disconnect();
|
sshUtil.disconnect();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue