OMS-GW-企业国别

This commit is contained in:
zhaoqing
2026-05-07 17:20:28 +08:00
parent da20e2a616
commit afdea9dbf1
7 changed files with 283 additions and 0 deletions
@@ -0,0 +1,33 @@
package com.mhd.oms.application.service.erpCountry;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.oms.domain.erpCountry.entity.ErpCountry;
import com.mhd.oms.domain.erpCountry.repository.mapper.ErpCountryMapper;
import com.mhd.oms.domain.erpCountry.repository.po.ErpCountryPO;
import com.mhd.oms.interfaces.dto.erpCountry.ErpCountryDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class ErpCountryApplicationService {
@Resource
private ErpCountryMapper erpCountryMapper;
public TableDataInfo queryList(ErpCountryDTO erpCountryDTO) {
List<ErpCountryPO> list = erpCountryMapper.queryList(erpCountryDTO);
TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setData(list);
tableDataInfo.setTotal(list.size());
tableDataInfo.setCode(200);
return tableDataInfo;
}
}
@@ -0,0 +1,76 @@
package com.mhd.oms.domain.erpCountry.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("erp_country")
@ApiModel(description = "企业国别实体")
public class ErpCountry implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
@ApiModelProperty("主键ID")
private Long id;
@ApiModelProperty("ERP国别编码")
private String erpCountryCode;
@ApiModelProperty("ERP国别名称")
private String erpCountryName;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
private Integer pushStatus;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("推送时间")
private Date pushTime;
@ApiModelProperty("推送人")
private String pushBy;
@ApiModelProperty("所属组织ID")
private Long organizationId;
@ApiModelProperty("一级组织ID")
private Long topOrganizationId;
@ApiModelProperty("所属组织名称")
private String organizationName;
@ApiModelProperty("创建人")
private Long createBy;
@ApiModelProperty("创建人姓名")
private String createByName;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新人")
private Long updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("删除标记:1-正常,0-删除")
private Integer delFlag;
}
@@ -0,0 +1,21 @@
package com.mhd.oms.domain.erpCountry.repository.mapper;
import com.mhd.oms.domain.erpCountry.entity.ErpCountry;
import com.mhd.oms.domain.erpCountry.repository.po.ErpCountryPO;
import com.mhd.oms.interfaces.dto.erpCountry.ErpCountryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ErpCountryMapper {
/**
*
* @param erpCountryDTO
* @return
*/
List<ErpCountryPO> queryList(@Param("erpCountryDTO") ErpCountryDTO erpCountryDTO);
}
@@ -0,0 +1,64 @@
package com.mhd.oms.domain.erpCountry.repository.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class ErpCountryPO {
@ApiModelProperty("主键ID")
private Long id;
@ApiModelProperty("ERP国别编码")
private String erpCountryCode;
@ApiModelProperty("ERP国别名称")
private String erpCountryName;
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
private Integer pushStatus;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("推送时间")
private Date pushTime;
@ApiModelProperty("推送人")
private String pushBy;
@ApiModelProperty("所属组织ID")
private Long organizationId;
@ApiModelProperty("一级组织ID")
private Long topOrganizationId;
@ApiModelProperty("所属组织名称")
private String organizationName;
@ApiModelProperty("创建人")
private Long createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新人")
private Long updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("删除标记:1-正常,0-删除")
private Integer delFlag;
}
@@ -0,0 +1,32 @@
package com.mhd.oms.interfaces.dto.erpCountry;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "企业国别DTO")
public class ErpCountryDTO {
@ApiModelProperty(value = "主键id")
private Long id;
@ApiModelProperty(value = "ERP国别编码")
private String erpCountryCode;
@ApiModelProperty(value = "ERP国别名称")
private String erpCountryName;
@ApiModelProperty(value = "推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
private Integer pushStatus;
@ApiModelProperty(value = "推送时间起")
private String pushTimeFrom;
@ApiModelProperty(value = "推送时间止")
private String pushTimeTo;
@ApiModelProperty(value = "所属组织ID")
private Long organizationId;
}
@@ -0,0 +1,31 @@
package com.mhd.oms.interfaces.facade.erpCountry;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.oms.application.service.erpCountry.ErpCountryApplicationService;
import com.mhd.oms.interfaces.dto.erpCountry.ErpCountryDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "企业国别管理")
@RestController
@RequestMapping("/erpCountryApi")
public class ErpCountryApi extends BaseController{
@Autowired
private ErpCountryApplicationService erpCountryApplicationService;
@ApiOperation("查询企业国别列表")
@GetMapping("/list")
public TableDataInfo list(ErpCountryDTO erpCountryDTO){
startPage();
return erpCountryApplicationService.queryList(erpCountryDTO);
}
}