进口仓单推送

This commit is contained in:
zhaoqing
2026-05-28 13:57:56 +08:00
parent 39e9ab66c3
commit 54d943ea10
7 changed files with 275 additions and 15 deletions
@@ -15,7 +15,9 @@ import com.mhd.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@Slf4j
@@ -56,4 +58,31 @@ public class GwLogApplicationService {
GwLogPO po = po1.get(0);
return po;
}
public AjaxResult insertGwLog(GwLogDTO gwLogDTO) {
if(gwLogDTO == null){
return AjaxResult.error("参数不能为空");
}
GwLog gwLog = new GwLog();
BeanUtils.copyProperties(gwLogDTO,gwLog);
gwLogMapper.insert(gwLog);
//返回id,供查询推送更新GwLog时使用
Map<String,Object> result = new HashMap<>();
result.put("id",gwLog.getLogId());
return AjaxResult.success("保存成功",result);
}
public AjaxResult updateGwLog(GwLogDTO gwLogDTO) {
if(gwLogDTO == null){
return AjaxResult.error("参数不能为空");
}
GwLog gwLog = new GwLog();
BeanUtils.copyProperties(gwLogDTO,gwLog);
gwLogMapper.updateById(gwLog);
return AjaxResult.success("修改成功");
}
}
@@ -1,11 +1,13 @@
package com.mhd.oms.interfaces.facade.gwLog;
import com.mhd.common.core.utils.bean.BeanUtils;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.oms.application.service.gwLog.GwLogApplicationService;
import com.mhd.oms.domain.gwLog.entity.GwLog;
import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
import com.mhd.oms.domain.gwLog.repository.po.GwLogPO;
import com.mhd.oms.interfaces.dto.gwLog.GwLogDTO;
import io.swagger.annotations.Api;
@@ -48,5 +50,16 @@ public class GwLogApi extends BaseController {
}
@ApiOperation("查询GW日志")
@PostMapping("/saveGwLog")
public AjaxResult saveGwLog(GwLogDTO gwLogDTO){
return gwLogApplicationService.insertGwLog(gwLogDTO);
}
@ApiOperation("查询GW日志")
@PostMapping("/updateGwLog")
public AjaxResult updateGwLog(GwLogDTO gwLogDTO){
return gwLogApplicationService.updateGwLog(gwLogDTO);
}
}