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());
|
||||
}
|
||||
}
|
||||
noScanningBaseControllerService.qrCodeCreateTask(it.getMaterialNo(), it.getFactoryNo(), it.getWarehouseNo());
|
||||
});
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||
.throwMessage("以下物料的扫码数量与收货数量不一致:" + StrUtil.join(",", materialNos));
|
||||
|
|
|
|||
|
|
@ -315,6 +315,7 @@ public class InProduceOrderSurplusController extends BaseController {
|
|||
.setCreateTime(Instant.now())
|
||||
);
|
||||
});
|
||||
noScanningBaseControllerService.qrCodeCreateTask(item.getMatnr(), order.getDwerk(), order.getLgort2());
|
||||
});
|
||||
inProduceOrderSurplusItemService.updateBatchById(datas);
|
||||
inMaterialScanRecordRespository.saveAll(records);
|
||||
|
|
|
|||
|
|
@ -971,6 +971,7 @@ public class NormalPGIController extends BaseController {
|
|||
.setFLAG("")
|
||||
.setSERNR(qrCodeMaster.getSerialNo()));
|
||||
});
|
||||
noScanningBaseControllerService.qrCodeCreateTask(item.getItemCode(), wmsPoReceipt.getFactoryCode(), item.getReceivedWarehouse());
|
||||
}
|
||||
normalPGIControllerService.takeDeliveryConfirm(receiptItems, inventories, zwm3A17DTOS, request.getTaskId());
|
||||
return ApiResult.success();
|
||||
|
|
|
|||
|
|
@ -858,6 +858,7 @@ public class TransferCompanyController extends BaseController {
|
|||
.setCreateBy(UserUtil.getUserName())
|
||||
.setCreateTime(Instant.now())
|
||||
);
|
||||
noScanningBaseControllerService.qrCodeCreateTask(record.getMaterialNo(), ticket.getWerks(), request.getWarehouseNo());
|
||||
});
|
||||
qrCodeMasters.stream()
|
||||
.filter(p -> p.getPackagingType() == 1)
|
||||
|
|
|
|||
|
|
@ -848,6 +848,7 @@ public class TransferFactoryController extends BaseController {
|
|||
.setCreateBy(UserUtil.getUserName())
|
||||
.setCreateTime(Instant.now())
|
||||
);
|
||||
noScanningBaseControllerService.qrCodeCreateTask(record.getMaterialNo(), ticket.getWerks(), request.getWarehouseNo());
|
||||
});
|
||||
qrCodeMasters.stream()
|
||||
.filter(p -> p.getPackagingType() == 1)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,23 @@
|
|||
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.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.WmsQrCodeMaster;
|
||||
import com.nflg.wms.repository.service.IWmsInventoryService;
|
||||
import com.nflg.wms.repository.service.IWmsQrCodeMasterService;
|
||||
import com.nflg.wms.repository.service.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class NoScanningBaseControllerService {
|
||||
|
||||
|
|
@ -19,6 +27,18 @@ public class NoScanningBaseControllerService {
|
|||
@Resource
|
||||
private IWmsInventoryService inventoryService;
|
||||
|
||||
@Resource
|
||||
private IQmsTodoItemService todoItemService;
|
||||
|
||||
@Resource
|
||||
private BasdeSerialNumberControllerService basdeSerialNumberControllerService;
|
||||
|
||||
@Resource
|
||||
private IDictionaryItemService dictionaryItemService;
|
||||
|
||||
@Resource
|
||||
private IRoleService roleService;
|
||||
|
||||
/**
|
||||
* 物料是否生成过二维码
|
||||
* @param materialNo 物料编号
|
||||
|
|
@ -32,7 +52,7 @@ public class NoScanningBaseControllerService {
|
|||
}
|
||||
|
||||
public boolean cannotOutNoScanning(String materialNo, String factoryNo, String warehouseNo) {
|
||||
if (!existsQrCode(materialNo)){
|
||||
if (existsQrCode(materialNo)) {
|
||||
return true;
|
||||
}
|
||||
return !quantityConsistencyCheck(materialNo, factoryNo, warehouseNo);
|
||||
|
|
@ -40,8 +60,8 @@ public class NoScanningBaseControllerService {
|
|||
|
||||
/**
|
||||
* 物料库存和物料二维码数量一致性检查
|
||||
* @param materialNo 物料编号
|
||||
* @param factoryNo 工厂编号
|
||||
* @param materialNo 物料编号
|
||||
* @param factoryNo 工厂编号
|
||||
* @param warehouseNo 仓库编号
|
||||
* @return 数量是否一致
|
||||
*/
|
||||
|
|
@ -71,13 +91,29 @@ public class NoScanningBaseControllerService {
|
|||
|
||||
/**
|
||||
* 创建仓库管理员补码任务
|
||||
* @param materialNo 物料编号
|
||||
* @param factoryNo 工厂编号
|
||||
* @param materialNo 物料编号
|
||||
* @param factoryNo 工厂编号
|
||||
* @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)) {
|
||||
//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 String remark;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -202,10 +202,10 @@ public class SRMController extends BaseController {
|
|||
inspect.setReceiveQty(inspect.getQualifiedQty());
|
||||
log.info("质检合格, 质检单号: {}, 合格数量: {}", data.getInspectionNum(), data.getQualifiedQty());
|
||||
|
||||
// 如果物料有二维码,则直接入库(参考NormalPGIController.takeDeliveryConfirm方法)
|
||||
if (hasQrCode) {
|
||||
// 如果物料没有生成过二维码,则直接入库(参考NormalPGIController.takeDeliveryConfirm方法)
|
||||
if (!hasQrCode) {
|
||||
inspect.setIsIn(true);
|
||||
log.info("物料有二维码, 执行直接入库, 质检单号: {}", data.getInspectionNum());
|
||||
log.info("物料没有生成过二维码, 执行直接入库, 质检单号: {}", data.getInspectionNum());
|
||||
|
||||
// 构建库存入库数据
|
||||
InventoryInDTO inventoryDTO = new InventoryInDTO()
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class DeployDevTest {
|
|||
//处理主jar包
|
||||
handleFile(sshUtil, localPath + jarName, remotePath + jarName);
|
||||
//处理lib目录
|
||||
handleDir(sshUtil, localPath, remotePath, "lib");
|
||||
// handleDir(sshUtil, localPath, remotePath, "lib");
|
||||
//执行脚本启动服务
|
||||
sshUtil.exec("cd " + remotePath + " && ./restart.sh");
|
||||
sshUtil.disconnect();
|
||||
|
|
|
|||
Loading…
Reference in New Issue