8 changed files with 195 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||||
|
package com.qs.serve.modules.bms.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import com.qs.serve.modules.bms.entity.BmsDutyInfo; |
||||
|
import com.qs.serve.modules.bms.service.BmsDutyInfoService; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 基础档案 税务信息 |
||||
|
* @author YenHex |
||||
|
* @since 2023-08-30 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("bms/dutyInfo") |
||||
|
public class BmsDutyInfoController { |
||||
|
|
||||
|
private BmsDutyInfoService bmsDutyInfoService; |
||||
|
|
||||
|
@GetMapping("/list") |
||||
|
public R<List<BmsDutyInfo>> getList(){ |
||||
|
List<BmsDutyInfo> list = bmsDutyInfoService.list( |
||||
|
new LambdaQueryWrapper<BmsDutyInfo>() |
||||
|
.eq(BmsDutyInfo::getShowFlag,1) |
||||
|
); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,97 @@ |
|||||
|
package com.qs.serve.modules.bms.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 税务信息表 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-08-30 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("bms_duty_info") |
||||
|
public class BmsDutyInfo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 公司名称 */ |
||||
|
@Length(max = 255,message = "公司名称长度不能超过255字") |
||||
|
private String comName; |
||||
|
|
||||
|
/** 税号 */ |
||||
|
@Length(max = 255,message = "税号长度不能超过255字") |
||||
|
private String dutyCode; |
||||
|
|
||||
|
/** 是否显示 */ |
||||
|
private Integer showFlag; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
/** 删除标识 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private Boolean delFlag; |
||||
|
|
||||
|
/** */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
|
||||
|
public static BmsDutyInfo toNewObject(BmsDutyInfo source){ |
||||
|
BmsDutyInfo dutyInfo = new BmsDutyInfo(); |
||||
|
dutyInfo.setId(source.getId()); |
||||
|
dutyInfo.setComName(source.getComName()); |
||||
|
dutyInfo.setDutyCode(source.getDutyCode()); |
||||
|
dutyInfo.setShowFlag(source.getShowFlag()); |
||||
|
dutyInfo.setRemark(source.getRemark()); |
||||
|
dutyInfo.setCreateTime(source.getCreateTime()); |
||||
|
dutyInfo.setCreateBy(source.getCreateBy()); |
||||
|
dutyInfo.setUpdateTime(source.getUpdateTime()); |
||||
|
dutyInfo.setUpdateBy(source.getUpdateBy()); |
||||
|
dutyInfo.setDelFlag(source.getDelFlag()); |
||||
|
dutyInfo.setTenantId(source.getTenantId()); |
||||
|
return dutyInfo; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.bms.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.bms.entity.BmsDutyInfo; |
||||
|
|
||||
|
/** |
||||
|
* 税务信息表 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-08-30 |
||||
|
*/ |
||||
|
public interface BmsDutyInfoMapper extends BaseMapper<BmsDutyInfo> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.bms.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.qs.serve.modules.bms.entity.BmsDutyInfo; |
||||
|
|
||||
|
/** |
||||
|
* 税务信息表 服务接口 |
||||
|
* @author YenHex |
||||
|
* @date 2023-08-30 |
||||
|
*/ |
||||
|
public interface BmsDutyInfoService extends IService<BmsDutyInfo> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,22 @@ |
|||||
|
package com.qs.serve.modules.bms.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.qs.serve.modules.bms.entity.BmsDutyInfo; |
||||
|
import com.qs.serve.modules.bms.service.BmsDutyInfoService; |
||||
|
import com.qs.serve.modules.bms.mapper.BmsDutyInfoMapper; |
||||
|
|
||||
|
/** |
||||
|
* 税务信息表 服务实现类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-08-30 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@AllArgsConstructor |
||||
|
public class BmsDutyInfoServiceImpl extends ServiceImpl<BmsDutyInfoMapper,BmsDutyInfo> implements BmsDutyInfoService { |
||||
|
|
||||
|
} |
||||
|
|
Loading…
Reference in new issue