feat(admin): 优化组件打包和生产订单功能
- 修复组件打包中的启套逻辑判断 - 添加物料扫描记录的复合键支持 - 实现生产订单中仓库编号变更的批量更新 - 优化生产订单接收物料的分组逻辑 - 添加使用指南文件类型的数据库字段 - 实现使用指南按类别查询的VO转换 - 修复部署测试中的目录处理注释问题 - 优化菜单按钮和角色权限的数据查询 - 添加SAP料号重复检查验证 - 调整生产领料单模板的页面尺寸和样式
This commit is contained in:
parent
c0faaf7475
commit
d977e8e1c7
|
|
@ -201,8 +201,8 @@ public class ComponentPackingController {
|
||||||
List<ComponentPackingItemPdaVO> daVos = tasks.stream()
|
List<ComponentPackingItemPdaVO> daVos = tasks.stream()
|
||||||
.map(item1 -> {
|
.map(item1 -> {
|
||||||
ComponentPackingItemPdaVO vo = Convert.convert(ComponentPackingItemPdaVO.class, item1);
|
ComponentPackingItemPdaVO vo = Convert.convert(ComponentPackingItemPdaVO.class, item1);
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(vo.getIdnrk()));
|
vo.setChildren(bomService.getChildrenVO(vo.getIdnrk()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -422,6 +422,7 @@ public class InProduceOrderController extends BaseController {
|
||||||
}
|
}
|
||||||
List<String> materialNos = new ArrayList<>();
|
List<String> materialNos = new ArrayList<>();
|
||||||
List<InMaterialScanRecord> records = new ArrayList<>();
|
List<InMaterialScanRecord> records = new ArrayList<>();
|
||||||
|
Map<Long, String> warehouseNoChange = new HashMap<>();
|
||||||
datas.forEach(it -> {
|
datas.forEach(it -> {
|
||||||
InProduceOrderReceiveMaterialQO materialQO = request.getItems()
|
InProduceOrderReceiveMaterialQO materialQO = request.getItems()
|
||||||
.stream()
|
.stream()
|
||||||
|
|
@ -433,6 +434,18 @@ public class InProduceOrderController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
VUtil.trueThrowBusinessError(it.isMustScan() && CollectionUtil.isEmpty(materialQO.getQrCodes()))
|
VUtil.trueThrowBusinessError(it.isMustScan() && CollectionUtil.isEmpty(materialQO.getQrCodes()))
|
||||||
.throwMessage(materialQO.getMaterialNo() + "需要提供扫码信息");
|
.throwMessage(materialQO.getMaterialNo() + "需要提供扫码信息");
|
||||||
|
if (!StrUtil.equals(it.getWarehouseNo(), materialQO.getWarehouseNo())) {
|
||||||
|
warehouseNoChange.put(it.getId(), materialQO.getWarehouseNo());
|
||||||
|
it.setWarehouseNo(materialQO.getWarehouseNo());
|
||||||
|
if (it.getParentId()>0){
|
||||||
|
InProduceOrderItemVO pit=list.stream()
|
||||||
|
.filter(l->Objects.equals(l.getId(),it.getParentId()))
|
||||||
|
.findFirst()
|
||||||
|
.get();
|
||||||
|
warehouseNoChange.put(pit.getId(), materialQO.getWarehouseNo());
|
||||||
|
pit.setWarehouseNo(materialQO.getWarehouseNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (it.isMustScan()) {
|
if (it.isMustScan()) {
|
||||||
BigDecimal num = BigDecimal.ZERO;
|
BigDecimal num = BigDecimal.ZERO;
|
||||||
for (String qrCode : materialQO.getQrCodes()) {
|
for (String qrCode : materialQO.getQrCodes()) {
|
||||||
|
|
@ -490,15 +503,19 @@ public class InProduceOrderController extends BaseController {
|
||||||
.map(InProduceOrderItemVO::getSernr)
|
.map(InProduceOrderItemVO::getSernr)
|
||||||
.toList();
|
.toList();
|
||||||
} else {
|
} else {
|
||||||
input1 = records.stream().collect(Collectors.groupingBy(InMaterialScanRecord::getBatchNo))
|
input1 = records.stream().collect(Collectors.groupingBy(InMaterialScanRecord::getKey8))
|
||||||
.entrySet()
|
.values()
|
||||||
.stream()
|
.stream()
|
||||||
.map(kv -> new Zwm00Mb107QO()
|
.map(inMaterialScanRecords -> {
|
||||||
.setPWERK(kv.getValue().get(0).getFactoryNo())
|
InMaterialScanRecord item = inMaterialScanRecords.get(0);
|
||||||
.setPSMNG(kv.getValue().stream().map(InMaterialScanRecord::getNum).reduce(BigDecimal.ZERO, BigDecimal::add))
|
return new Zwm00Mb107QO()
|
||||||
.setAMEIN(kv.getValue().get(0).getUnit())
|
.setPWERK(item.getFactoryNo())
|
||||||
.setLGORT(kv.getValue().get(0).getWarehouseNo())
|
.setPSMNG(inMaterialScanRecords.stream().map(InMaterialScanRecord::getNum).reduce(BigDecimal.ZERO, BigDecimal::add))
|
||||||
.setCHARG(kv.getKey()))
|
.setAMEIN(item.getUnit())
|
||||||
|
.setLGORT(item.getWarehouseNo())
|
||||||
|
.setCHARG(item.getBatchNo());
|
||||||
|
}
|
||||||
|
)
|
||||||
.toList();
|
.toList();
|
||||||
sernrs = records.stream()
|
sernrs = records.stream()
|
||||||
.map(InMaterialScanRecord::getSerialNo)
|
.map(InMaterialScanRecord::getSerialNo)
|
||||||
|
|
@ -516,6 +533,16 @@ public class InProduceOrderController extends BaseController {
|
||||||
).toList()
|
).toList()
|
||||||
);
|
);
|
||||||
inMaterialScanRecordRespository.saveAll(records);
|
inMaterialScanRecordRespository.saveAll(records);
|
||||||
|
if (CollectionUtil.isNotEmpty(warehouseNoChange)) {
|
||||||
|
produceOrderItemService.updateBatchById(
|
||||||
|
warehouseNoChange.entrySet()
|
||||||
|
.stream()
|
||||||
|
.map(it -> new WmsInProduceOrderItem()
|
||||||
|
.setId(it.getKey())
|
||||||
|
.setWarehouseNo(it.getValue())
|
||||||
|
).toList()
|
||||||
|
);
|
||||||
|
}
|
||||||
//同步入库信息到SAP
|
//同步入库信息到SAP
|
||||||
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, sernrs);
|
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, sernrs);
|
||||||
order.setMblnr(dto.getE_MBLNR());
|
order.setMblnr(dto.getE_MBLNR());
|
||||||
|
|
|
||||||
|
|
@ -184,8 +184,8 @@ public class OutAssistanceController extends BaseController {
|
||||||
.setMatnr(item.getMatnr1())
|
.setMatnr(item.getMatnr1())
|
||||||
.setMeins(item.getMeins())
|
.setMeins(item.getMeins())
|
||||||
.setNum(item.getLeft());
|
.setNum(item.getLeft());
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(item.getMatnr1()));
|
vo.setChildren(bomService.getChildrenVO(item.getMatnr1()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -183,8 +183,8 @@ public class OutCostCenterController extends BaseController {
|
||||||
.setMatnr(item.getMatnr())
|
.setMatnr(item.getMatnr())
|
||||||
.setNum(item.getLeft())
|
.setNum(item.getLeft())
|
||||||
.setMeins(item.getMeins());
|
.setMeins(item.getMeins());
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -299,8 +299,8 @@ public class OutProduceController extends BaseController {
|
||||||
.setMeins(item.getMeins())
|
.setMeins(item.getMeins())
|
||||||
.setNum(item.getSqsl().subtract(item.getNum()));
|
.setNum(item.getSqsl().subtract(item.getNum()));
|
||||||
Integer type = bomService.getScanType(item.getMatnr());
|
Integer type = bomService.getScanType(item.getMatnr());
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -220,8 +220,8 @@ public class TransferCompanyController extends BaseController {
|
||||||
.setMaktx(item.getMaktx())
|
.setMaktx(item.getMaktx())
|
||||||
.setNum(item.getLeft())
|
.setNum(item.getLeft())
|
||||||
.setMeins(item.getMeins());
|
.setMeins(item.getMeins());
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -214,8 +214,8 @@ public class TransferFactoryController extends BaseController {
|
||||||
.setMeins(item.getMeins())
|
.setMeins(item.getMeins())
|
||||||
.setBinIn(StrUtil.join("/", storageService.getBinNos(item.getMatnr(), order.getWerks(), order.getUmlgo())))
|
.setBinIn(StrUtil.join("/", storageService.getBinNos(item.getMatnr(), order.getWerks(), order.getUmlgo())))
|
||||||
.setBinOut(StrUtil.join("/", storageService.getBinNos(item.getMatnr(), order.getWerks(), order.getLgort())));
|
.setBinOut(StrUtil.join("/", storageService.getBinNos(item.getMatnr(), order.getWerks(), order.getLgort())));
|
||||||
|
vo.setQiTao(type > 0);
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
vo.setQiTao(true);
|
|
||||||
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
vo.setChildren(bomService.getChildrenVO(item.getMatnr()));
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.nflg.wms.common.pojo.ApiResult;
|
import com.nflg.wms.common.pojo.ApiResult;
|
||||||
|
import com.nflg.wms.common.pojo.vo.UsageGuideVO;
|
||||||
import com.nflg.wms.common.util.UserUtil;
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
import com.nflg.wms.repository.entity.UsageGuide;
|
import com.nflg.wms.repository.entity.UsageGuide;
|
||||||
import com.nflg.wms.repository.service.IUsageGuideService;
|
import com.nflg.wms.repository.service.IUsageGuideService;
|
||||||
|
|
@ -36,14 +37,11 @@ public class UsageGuideController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件搜索
|
* 文件搜索
|
||||||
|
* @param categoryId 类别id,字典id
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getFiles")
|
@GetMapping("/getFiles")
|
||||||
public ApiResult<List<UsageGuide>> getFiles(@RequestParam Long categoryId) {
|
public ApiResult<List<UsageGuideVO>> getFiles(@RequestParam(required = false) Long categoryId) {
|
||||||
return ApiResult.success(
|
return ApiResult.success(usageGuideService.getFiles(categoryId));
|
||||||
usageGuideService.lambdaQuery()
|
|
||||||
.eq(UsageGuide::getCategoryId, categoryId)
|
|
||||||
.list()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -61,6 +59,7 @@ public class UsageGuideController extends BaseController {
|
||||||
.setFileName(fileName)
|
.setFileName(fileName)
|
||||||
.setFileSize(file.getSize())
|
.setFileSize(file.getSize())
|
||||||
.setUrl(url)
|
.setUrl(url)
|
||||||
|
.setFileType(getFileType(file.getOriginalFilename()))
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(LocalDateTime.now())
|
.setCreateTime(LocalDateTime.now())
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/*width: 280mm;*/
|
width: 1425px;
|
||||||
font-family: SimSun, serif;
|
height: 825px;
|
||||||
font-size: 11pt;
|
font-family: SimSun, monospace;
|
||||||
|
font-size: 12pt;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,13 +39,13 @@
|
||||||
|
|
||||||
.company-name {
|
.company-name {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 22pt;
|
font-size: 23pt;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 25pt;
|
font-size: 26pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
@ -105,15 +106,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-unit {
|
.col-unit {
|
||||||
width: 30px;
|
width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-apply {
|
.col-apply {
|
||||||
width: 60px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-actual {
|
.col-actual {
|
||||||
width: 60px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-warehouse {
|
.col-warehouse {
|
||||||
|
|
@ -140,7 +141,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.package-logo {
|
.package-logo {
|
||||||
width: 280px;
|
width: 300px;
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +151,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrcode {
|
.qrcode {
|
||||||
width: 140px;
|
width: 150px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class DeployTest {
|
||||||
//处理主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();
|
||||||
|
|
|
||||||
|
|
@ -163,4 +163,11 @@ public class InMaterialScanRecord {
|
||||||
public String getKey7() {
|
public String getKey7() {
|
||||||
return materialNo + "|" + batchNo;
|
return materialNo + "|" + batchNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String key8;
|
||||||
|
|
||||||
|
public String getKey8() {
|
||||||
|
return batchNo + "|" + factoryNo + "|" + unit + "|" + warehouseNo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ public class InProduceOrderReceiveMaterialQO {
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String materialNo;
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 储位编号列表
|
* 储位编号列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.nflg.wms.common.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UsageGuideVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别id,字典id
|
||||||
|
*/
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 访问地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大小
|
||||||
|
*/
|
||||||
|
private Long fileSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
|
|
@ -60,4 +60,9 @@ public class UsageGuide implements Serializable {
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
package com.nflg.wms.repository.mapper;
|
package com.nflg.wms.repository.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.nflg.wms.common.pojo.vo.UsageGuideVO;
|
||||||
import com.nflg.wms.repository.entity.UsageGuide;
|
import com.nflg.wms.repository.entity.UsageGuide;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Mapper 接口
|
* Mapper 接口
|
||||||
|
|
@ -13,4 +16,5 @@ import com.nflg.wms.repository.entity.UsageGuide;
|
||||||
*/
|
*/
|
||||||
public interface UsageGuideMapper extends BaseMapper<UsageGuide> {
|
public interface UsageGuideMapper extends BaseMapper<UsageGuide> {
|
||||||
|
|
||||||
|
List<UsageGuideVO> getFiles(Long categoryId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
package com.nflg.wms.repository.service;
|
package com.nflg.wms.repository.service;
|
||||||
|
|
||||||
|
import com.nflg.wms.common.pojo.vo.UsageGuideVO;
|
||||||
import com.nflg.wms.repository.entity.UsageGuide;
|
import com.nflg.wms.repository.entity.UsageGuide;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务类
|
* 服务类
|
||||||
|
|
@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
*/
|
*/
|
||||||
public interface IUsageGuideService extends IService<UsageGuide> {
|
public interface IUsageGuideService extends IService<UsageGuide> {
|
||||||
|
|
||||||
|
List<UsageGuideVO> getFiles(Long categoryId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -103,6 +104,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||||
MenuVO menu = menus.get(i);
|
MenuVO menu = menus.get(i);
|
||||||
bindParent(menu, menus);
|
bindParent(menu, menus);
|
||||||
}
|
}
|
||||||
|
menus.sort(Comparator.comparingInt(MenuVO::getSort));
|
||||||
return menus;
|
return menus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -110,7 +112,13 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||||
if (!Objects.equals(0L, menu.getParentId())) {
|
if (!Objects.equals(0L, menu.getParentId())) {
|
||||||
Menu mp = menuService.getById(menu.getParentId());
|
Menu mp = menuService.getById(menu.getParentId());
|
||||||
if (datas.stream().noneMatch(d -> Objects.equals(d.getId(), mp.getId()))) {
|
if (datas.stream().noneMatch(d -> Objects.equals(d.getId(), mp.getId()))) {
|
||||||
MenuVO m = new MenuVO().setId(mp.getId()).setName(mp.getName()).setShow(mp.getShow()).setUrl(mp.getUrl()).setComponent(mp.getComponent()).setParentId(mp.getParentId());
|
MenuVO m = new MenuVO()
|
||||||
|
.setId(mp.getId())
|
||||||
|
.setName(mp.getName())
|
||||||
|
.setShow(mp.getShow())
|
||||||
|
.setUrl(mp.getUrl())
|
||||||
|
.setComponent(mp.getComponent())
|
||||||
|
.setParentId(mp.getParentId());
|
||||||
datas.add(m);
|
datas.add(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.nflg.wms.repository.service.impl;
|
package com.nflg.wms.repository.service.impl;
|
||||||
|
|
||||||
|
import com.nflg.wms.common.pojo.vo.UsageGuideVO;
|
||||||
import com.nflg.wms.repository.entity.UsageGuide;
|
import com.nflg.wms.repository.entity.UsageGuide;
|
||||||
import com.nflg.wms.repository.mapper.UsageGuideMapper;
|
import com.nflg.wms.repository.mapper.UsageGuideMapper;
|
||||||
import com.nflg.wms.repository.service.IUsageGuideService;
|
import com.nflg.wms.repository.service.IUsageGuideService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务实现类
|
* 服务实现类
|
||||||
|
|
@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class UsageGuideServiceImpl extends ServiceImpl<UsageGuideMapper, UsageGuide> implements IUsageGuideService {
|
public class UsageGuideServiceImpl extends ServiceImpl<UsageGuideMapper, UsageGuide> implements IUsageGuideService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UsageGuideVO> getFiles(Long categoryId) {
|
||||||
|
return baseMapper.getFiles(categoryId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ public class WmsMaterialServiceImpl extends ServiceImpl<WmsMaterialMapper, WmsMa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(WmsMaterial wmsMaterial) {
|
public void add(WmsMaterial wmsMaterial) {
|
||||||
|
VUtil.trueThrowBusinessError(wmsMaterial.getVersion()==1
|
||||||
|
&& lambdaQuery().eq(WmsMaterial::getNo, wmsMaterial.getNo()).exists())
|
||||||
|
.throwMessage("SAP料号已存在");
|
||||||
save(wmsMaterial);
|
save(wmsMaterial);
|
||||||
auditLogService.addInsert(WmsMaterial.class, wmsMaterial, wmsMaterial.getCreateBy());
|
auditLogService.addInsert(WmsMaterial.class, wmsMaterial, wmsMaterial.getCreateBy());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<mapper namespace="com.nflg.wms.repository.mapper.MenuMapper">
|
<mapper namespace="com.nflg.wms.repository.mapper.MenuMapper">
|
||||||
|
|
||||||
<select id="getButtonsByMenuId" resultType="com.nflg.wms.common.pojo.vo.ButtonVO">
|
<select id="getButtonsByMenuId" resultType="com.nflg.wms.common.pojo.vo.ButtonVO">
|
||||||
SELECT DISTINCT mb.name, mb.code
|
SELECT DISTINCT mb.id,mb.name, mb.code
|
||||||
FROM role r
|
FROM role r
|
||||||
INNER JOIN role_button_map rbm ON r.id = rbm.role_id
|
INNER JOIN role_button_map rbm ON r.id = rbm.role_id
|
||||||
INNER JOIN menu_button mb ON rbm.button_id = mb.id
|
INNER JOIN menu_button mb ON rbm.button_id = mb.id
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMenusByRoleCodes" resultType="com.nflg.wms.common.pojo.vo.MenuVO">
|
<select id="getMenusByRoleCodes" resultType="com.nflg.wms.common.pojo.vo.MenuVO">
|
||||||
SELECT DISTINCT m.id, m.name, m.url, m.component, m.parent_id AS "parentId", m.show
|
SELECT DISTINCT m.id, m.name, m.url, m.component, m.parent_id AS "parentId", m.show,m.sort
|
||||||
FROM role r
|
FROM role r
|
||||||
INNER JOIN role_menu_map rmm ON r.id = rmm.role_id
|
INNER JOIN role_menu_map rmm ON r.id = rmm.role_id
|
||||||
INNER JOIN menu m ON rmm.menu_id = m.id
|
INNER JOIN menu m ON rmm.menu_id = m.id
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,15 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nflg.wms.repository.mapper.UsageGuideMapper">
|
<mapper namespace="com.nflg.wms.repository.mapper.UsageGuideMapper">
|
||||||
|
|
||||||
|
<select id="getFiles" resultType="com.nflg.wms.common.pojo.vo.UsageGuideVO">
|
||||||
|
SELECT g.*,d.name AS "category_name"
|
||||||
|
FROM usage_guide g
|
||||||
|
LEFT JOIN dictionary_item d ON g.category_id=d."id"
|
||||||
|
<where>
|
||||||
|
<if test="categoryId != null">
|
||||||
|
g.category_id = #{categoryId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by g.id desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class DeployTest {
|
||||||
sshUtil.connect("192.168.163.84", 22, "root", "CMP2025nf");
|
sshUtil.connect("192.168.163.84", 22, "root", "CMP2025nf");
|
||||||
//处理主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");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue