diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java new file mode 100644 index 000000000..e39317e01 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java @@ -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 list = erpCountryMapper.queryList(erpCountryDTO); + TableDataInfo tableDataInfo = new TableDataInfo(); + tableDataInfo.setData(list); + tableDataInfo.setTotal(list.size()); + tableDataInfo.setCode(200); + return tableDataInfo; + + + + } +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/entity/ErpCountry.java b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/entity/ErpCountry.java new file mode 100644 index 000000000..9aa16f177 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/entity/ErpCountry.java @@ -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; +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/mapper/ErpCountryMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/mapper/ErpCountryMapper.java new file mode 100644 index 000000000..434d4a3c4 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/mapper/ErpCountryMapper.java @@ -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 queryList(@Param("erpCountryDTO") ErpCountryDTO erpCountryDTO); +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/po/ErpCountryPO.java b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/po/ErpCountryPO.java new file mode 100644 index 000000000..2aa20e182 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/erpCountry/repository/po/ErpCountryPO.java @@ -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; + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/erpCountry/ErpCountryDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/erpCountry/ErpCountryDTO.java new file mode 100644 index 000000000..486af6f3c --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/erpCountry/ErpCountryDTO.java @@ -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; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java new file mode 100644 index 000000000..b17ea0881 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java @@ -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); + } + + +} diff --git a/mhd_oms/src/main/resources/mapper/erpCountry/ErpCountryMapper.xml b/mhd_oms/src/main/resources/mapper/erpCountry/ErpCountryMapper.xml new file mode 100644 index 000000000..72ef2edf0 --- /dev/null +++ b/mhd_oms/src/main/resources/mapper/erpCountry/ErpCountryMapper.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file