15 files modified
32 files added
| | |
| | | secureRegistry.excludePathPatterns("/blade-auth/**"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/routes"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/auth-routes"); |
| | | secureRegistry.excludePathPatterns("/blade-system/**"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/top-menu"); |
| | | secureRegistry.excludePathPatterns("/blade-system/tenant/info"); |
| | | secureRegistry.excludePathPatterns("/blade-flow/process/resource-view"); |
| | |
| | | */ |
| | | package org.springblade.modules.information.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.*; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.desk.entity.Notice; |
| | | import org.springblade.modules.desk.vo.NoticeVO; |
| | | import org.springblade.modules.desk.wrapper.NoticeWrapper; |
| | | import org.springblade.modules.member.service.IMemberService; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | public class InformationController extends BladeController { |
| | | |
| | | private final IInformationService informationService; |
| | | private final IDeptService iDeptService; |
| | | |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入information") |
| | | public R<IPage<Information>> list(Information information, Query query) { |
| | | IPage<Information> pages = informationService.page(Condition.getPage(query), Condition.getQueryWrapper(information)); |
| | | public R<IPage<Information>> list(@ApiIgnore @RequestParam Map<String, Object> information , Query query) { |
| | | IPage<Information> pages = informationService.page(Condition.getPage(query), Condition.getQueryWrapper(information, Information.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入information") |
| | | public R<IPage<InformationVO>> page(InformationVO information, Query query) { |
| | | IPage<InformationVO> pages = informationService.selectInformationPage(Condition.getPage(query), information); |
| | | public R<IPage<Information>> page(Information information, Query query) { |
| | | IPage<Information> pages = informationService.selectInformationPage(Condition.getPage(query), information); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 首页保安公司统计接口 |
| | | * @return |
| | | */ |
| | | @PostMapping("/SelectCount") |
| | | public R SelectCount() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> list = iDeptService.selectCount(name); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | String title = list.get(i).get("title");//部门名称 |
| | | String departmentid = String.valueOf(list.get(i).get("jurisdiction"));//部门id |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map maps = informationService.selectCount(departmentid); |
| | | map.put("name",title); |
| | | map.put("server",maps); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 首页保安持证统计接口 |
| | | * @return |
| | | */ |
| | | @PostMapping("/SelectCounthold") |
| | | public R SelectCounthold() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> list = iDeptService.selectCount(name); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | int cznumber=0;//总的持证数量 |
| | | int wcznumber=0;//总的未持证数量 |
| | | String title = list.get(i).get("title");//部门名称 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<Object, Integer> objectStringMap = iDeptService.selectHold(String.valueOf(list.get(i).get("jurisdiction"))); |
| | | cznumber=objectStringMap.get("cz");; |
| | | wcznumber=objectStringMap.get("wcz");; |
| | | map.put("name",title); |
| | | map.put("cz",cznumber); |
| | | map.put("wcz",wcznumber); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *统计保安公司未持证的保安的公司数量 |
| | | */ |
| | | @PostMapping("/selectInCount") |
| | | public R selectInCount() { |
| | | List<Map<Object, String>> maps = informationService.selectInCount(); |
| | | return R.data(maps); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *管辖区域下拉 |
| | | */ |
| | | @PostMapping("/selecttree") |
| | | public R selecttree() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> maps = iDeptService.selectCount(name); |
| | | return R.data(maps); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | /** |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | private String enterprisename; |
| | | /** |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | /** |
| | | * 登记状态 |
| | | */ |
| | | @ApiModelProperty(value = "登记状态") |
| | | private String regstsat; |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date establishtime; |
| | | /** |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | private String establishtime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | /** |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | private String organizationcode; |
| | | /** |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | private String registrationnumber; |
| | | /** |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | private String identificationnumber; |
| | | /** |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | /** |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | /** |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | /** |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | /** |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | /** |
| | | * 租户ID |
| | | */ |
| | | @ApiModelProperty(value = "租户ID") |
| | | @TableField("tenantId") |
| | | private String tenantid; |
| | | * 租户ID |
| | | */ |
| | | @ApiModelProperty(value = "分局id") |
| | | private String departmentid; |
| | | |
| | | private String stats; |
| | | private String jurisdiction; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.information.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | |
| | | * @param information |
| | | * @return |
| | | */ |
| | | List<InformationVO> selectInformationPage(IPage page, InformationVO information); |
| | | List<Information> selectInformationPage(IPage page,Information information); |
| | | void deleteIn(String creditcode); |
| | | void deleteSh(String creditcode); |
| | | void deleteMe(String creditcode); |
| | | |
| | | Map selectCount(String departmentid); |
| | | List<Map<Object,String>> selectInCount(); |
| | | } |
| | |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="enterpriseName" property="enterprisename"/> |
| | | <result column="representative" property="representative"/> |
| | | <result column="regstsat" property="regstsat"/> |
| | | <result column="establishTime" property="establishtime"/> |
| | | <result column="registeredCapital" property="registeredcapital"/> |
| | | <result column="capital" property="capital"/> |
| | |
| | | <result column="region" property="region"/> |
| | | <result column="registration" property="registration"/> |
| | | <result column="industry" property="industry"/> |
| | | <result column="tenantId" property="tenantid"/> |
| | | <result column="departmentid" property="departmentid"/> |
| | | <result column="stats" property="stats"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectInformationPage" resultMap="informationResultMap"> |
| | | select * from sys_information where 1=1 |
| | | select * from sys_information where 1=1 |
| | | <if test="information.enterprisename!=null and information.enterprisename!=''"> |
| | | and enterpriseName like concat(concat('%', #{information.enterprisename}),'%') |
| | | </if> |
| | |
| | | <if test="information.stats!=null and information.stats!=''"> |
| | | and stats=#{stats} |
| | | </if> |
| | | <if test="information.jurisdiction!=null and information.jurisdiction!=''"> |
| | | and jurisdiction=#{jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | | <delete id="deleteIn"> |
| | | delete from sys_information where creditCode=#{creditcode} |
| | | delete |
| | | from sys_information |
| | | where creditCode = #{creditcode} |
| | | </delete> |
| | | <delete id="deleteSh"> |
| | | delete from sys_shareholder where creditCode=#{creditcode} |
| | | delete |
| | | from sys_shareholder |
| | | where creditCode = #{creditcode} |
| | | </delete> |
| | | <delete id="deleteMe"> |
| | | delete from sys_member where creditCode=#{creditcode} |
| | | delete |
| | | from sys_member |
| | | where creditCode = #{creditcode} |
| | | </delete> |
| | | |
| | | <select id="selectCount" resultType="java.util.HashMap"> |
| | | SELECT |
| | | isnull( B.confess, 0 ) AS confess, |
| | | isnull( C.staff, 0 ) AS staff, |
| | | isnull( D.security, 0 ) AS security, |
| | | isnull( E.armed, 0 ) AS armed |
| | | FROM |
| | | ( SELECT jurisdiction FROM sys_information GROUP BY jurisdiction ) A |
| | | FULL JOIN ( SELECT COUNT ( stats ) AS confess, jurisdiction FROM sys_information WHERE stats = 0 GROUP BY jurisdiction ) B ON A.jurisdiction = B.jurisdiction |
| | | FULL JOIN ( SELECT COUNT ( stats ) AS staff, jurisdiction FROM sys_information WHERE stats = 1 GROUP BY jurisdiction ) C ON A.jurisdiction = C.jurisdiction |
| | | FULL JOIN ( SELECT COUNT ( stats ) AS security, jurisdiction FROM sys_information WHERE stats = 2 GROUP BY jurisdiction ) D ON A.jurisdiction = D.jurisdiction |
| | | FULL JOIN ( SELECT COUNT ( stats ) AS armed, jurisdiction FROM sys_information WHERE stats = 3 GROUP BY jurisdiction ) E ON A.jurisdiction = E.jurisdiction |
| | | WHERE |
| | | A.jurisdiction = #{departmentid} |
| | | </select> |
| | | |
| | | <select id="selectInCount" resultType="java.util.HashMap"> |
| | | SELECT COUNT(u.dept_id) AS number,d.dept_name FROM blade_user u LEFT JOIN blade_dept d ON d.id=u.dept_id WHERE u.hold=1 GROUP BY u.dept_id,d.dept_name |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | package org.springblade.modules.information.service; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | * @param information |
| | | * @return |
| | | */ |
| | | IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information); |
| | | IPage<Information> selectInformationPage(IPage<Information> page, Information information); |
| | | void deleteIn(String creditCode); |
| | | void deleteSh(String creditCode); |
| | | void deleteMe(String creditCode); |
| | | Map selectCount(String departmentid); |
| | | List<Map<Object,String>> selectInCount(); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | |
| | | public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements IInformationService { |
| | | |
| | | @Override |
| | | public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information) { |
| | | public IPage<Information> selectInformationPage(IPage<Information> page, Information information) { |
| | | return page.setRecords(baseMapper.selectInformationPage(page, information)); |
| | | } |
| | | |
| | |
| | | baseMapper.deleteMe(creditcode); |
| | | } |
| | | |
| | | @Override |
| | | public Map selectCount(String departmentid) { |
| | | return baseMapper.selectCount(departmentid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, String>> selectInCount() { |
| | | return baseMapper.selectInCount(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String cell; |
| | | /** |
| | | * 持股比例 |
| | | */ |
| | | @ApiModelProperty(value = "持股比例") |
| | | private String shareholdingratio; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date rtime; |
| | | } |
| | |
| | | <result column="post" property="post"/> |
| | | <result column="cardid" property="cardid"/> |
| | | <result column="cell" property="cell"/> |
| | | <result column="shareholdingratio" property="shareholdingratio"/> |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="rtime" property="rtime"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import org.springblade.modules.performance.vo.PerformanceVO; |
| | | import org.springblade.modules.performance.service.IPerformanceService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 保安员表现管理 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询本年所有月份的表现差的数量 |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearPer") |
| | | public R queryYearAlarm() { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = performanceService.queryYearPer(year); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | //升序 |
| | | public static Map<String, String> sortMapBykeyAsc(Map<String, String> oriMap) { |
| | | Map<String, String> sortedMap = new LinkedHashMap<String, String>(); |
| | | try { |
| | | if (oriMap != null && !oriMap.isEmpty()) { |
| | | List<Map.Entry<String, String>> entryList = new ArrayList<Map.Entry<String, String>>(oriMap.entrySet()); |
| | | Collections.sort(entryList, |
| | | new Comparator<Map.Entry<String, String>>() { |
| | | public int compare(Map.Entry<String, String> entry2, |
| | | Map.Entry<String, String> entry1) { |
| | | int value2 = 0, value1 = 0; |
| | | try { |
| | | value2 = Integer.parseInt(entry1.getKey()); |
| | | value1 = Integer.parseInt(entry2.getKey()); |
| | | } catch (NumberFormatException e) { |
| | | value2 = 0; |
| | | value1 = 0; |
| | | } |
| | | return value1 - value2; |
| | | } |
| | | }); |
| | | Iterator<Map.Entry<String, String>> iter = entryList.iterator(); |
| | | Map.Entry<String, String> tmpEntry = null; |
| | | while (iter.hasNext()) { |
| | | tmpEntry = iter.next(); |
| | | sortedMap.put(tmpEntry.getKey(), tmpEntry.getValue()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | return sortedMap; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 保安人编码 |
| | | */ |
| | | @ApiModelProperty(value = "保安人编码") |
| | | @TableField("securityId") |
| | | * 保安人编码 |
| | | */ |
| | | @ApiModelProperty(value = "保安人编码") |
| | | @TableField("securityId") |
| | | private String securityid; |
| | | /** |
| | | * 工作态度 |
| | | */ |
| | | @ApiModelProperty(value = "工作态度") |
| | | @TableField("workingAttitude") |
| | | * 工作态度 |
| | | */ |
| | | @ApiModelProperty(value = "工作态度") |
| | | @TableField("workingAttitude") |
| | | private String workingattitude; |
| | | |
| | | /** |
| | | * 工作能力 |
| | | */ |
| | | @ApiModelProperty(value = "工作能力") |
| | | @TableField("workingAbility") |
| | | private String workingability; |
| | | /** |
| | | * 工作成效 |
| | | */ |
| | | @ApiModelProperty(value = "工作成效") |
| | | @TableField("Achievements") |
| | | * 工作成效 |
| | | */ |
| | | @ApiModelProperty(value = "工作成效") |
| | | @TableField("Achievements") |
| | | private String achievements; |
| | | /** |
| | | * 评分 |
| | | */ |
| | | @ApiModelProperty(value = "评分") |
| | | private String score; |
| | | * 评分 |
| | | */ |
| | | @ApiModelProperty(value = "评分") |
| | | private String score; |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @ApiModelProperty(value = "时间") |
| | | private String time; |
| | | /** |
| | | * 租户ID |
| | | */ |
| | | @ApiModelProperty(value = "租户ID") |
| | | @TableField("tenantId") |
| | | private String tenantid; |
| | | private String company; |
| | | * 时间 |
| | | */ |
| | | @ApiModelProperty(value = "时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date time; |
| | | private String departmentid; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | List<PerformanceVO> selectPerformancePage(IPage page, PerformanceVO performance); |
| | | |
| | | Map<String, String> queryYearPer(String year); |
| | | } |
| | |
| | | <result column="Achievements" property="achievements"/> |
| | | <result column="score" property="score"/> |
| | | <result column="time" property="time"/> |
| | | <result column="tenantId" property="tenantid"/> |
| | | <result column="company" property="company"/> |
| | | <result column="departmentid" property="departmentid"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPerformancePage" resultMap="performanceResultMap"> |
| | | select * from sys_performance where is_deleted = 0 |
| | | select * from sys_performance |
| | | </select> |
| | | |
| | | |
| | | <!--查询本年所有月份的表现差的数量--> |
| | | <select id="queryYearPer" resultType="java.util.HashMap"> |
| | | SELECT COUNT |
| | | ( CASE WHEN MONTH ( s.time ) = 1 THEN s.score END ) AS '1', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 2 THEN s.score END ) AS '2', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 3 THEN s.score END ) AS '3', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 4 THEN s.score END ) AS '4', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 5 THEN s.score END ) AS '5', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 6 THEN s.score END ) AS '6', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 7 THEN s.score END ) AS '7', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 8 THEN s.score END ) AS '8', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 9 THEN s.score END ) AS '9', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 10 THEN s.score END ) AS '10', |
| | | COUNT ( CASE WHEN MONTH ( s.time ) = 11 THEN s.score END ) AS '11', |
| | | COUNT (CASE WHEN MONTH ( s.time ) = 12 THEN s.score END ) AS '12' |
| | | FROM |
| | | sys_performance AS s |
| | | WHERE |
| | | YEAR ( s.time ) = #{year} AND score=3 |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | |
| | | * @return |
| | | */ |
| | | IPage<PerformanceVO> selectPerformancePage(IPage<PerformanceVO> page, PerformanceVO performance); |
| | | |
| | | Map<String, String> queryYearPer(String year); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | |
| | | return page.setRecords(baseMapper.selectPerformancePage(page, performance)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, String> queryYearPer(String year) { |
| | | return baseMapper.queryYearPer(year); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-permit/permit") |
| | | @Api(value = "", tags = "接口") |
| | | public class PermitController extends BladeController { |
| | | |
| | | private final IPermitService permitService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入permit") |
| | | public R<Permit> detail(Permit permit) { |
| | | Permit detail = permitService.getOne(Condition.getQueryWrapper(permit)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入permit") |
| | | public R<IPage<Permit>> list(Permit permit, Query query) { |
| | | IPage<Permit> pages = permitService.page(Condition.getPage(query), Condition.getQueryWrapper(permit)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入permit") |
| | | public R<IPage<PermitVO>> page(PermitVO permit, Query query) { |
| | | IPage<PermitVO> pages = permitService.selectPermitPage(Condition.getPage(query), permit); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入permit") |
| | | public R save(@Valid @RequestBody Permit permit) { |
| | | return R.status(permitService.save(permit)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入permit") |
| | | public R update(@Valid @RequestBody Permit permit) { |
| | | return R.status(permitService.updateById(permit)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入permit") |
| | | public R submit(@Valid @RequestBody Permit permit) { |
| | | return R.status(permitService.saveOrUpdate(permit)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(permitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.dto; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PermitDTO extends Permit { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @TableName("sys_permit") |
| | | @ApiModel(value = "Permit对象", description = "Permit对象") |
| | | public class Permit implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | /** |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | private String enterprisename; |
| | | /** |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | /** |
| | | * 登记状态 |
| | | */ |
| | | @ApiModelProperty(value = "登记状态") |
| | | private String |
| | | regstsat; |
| | | /** |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | private LocalDateTime establishtime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | /** |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | private String organizationcode; |
| | | /** |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | private String registrationnumber; |
| | | /** |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | private String identificationnumber; |
| | | /** |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | /** |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | /** |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | /** |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | /** |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | /** |
| | | * 审核状态 0:审核通过 1:审核不通过 2: 审核中 |
| | | */ |
| | | @ApiModelProperty(value = "审核状态 0:审核通过 1:审核不通过 2: 审核中") |
| | | private String type; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.mapper; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface PermitMapper extends BaseMapper<Permit> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param permit |
| | | * @return |
| | | */ |
| | | List<PermitVO> selectPermitPage(IPage page, PermitVO permit); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.permit.mapper.PermitMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="permitResultMap" type="org.springblade.modules.permit.entity.Permit"> |
| | | <id column="id" property="id"/> |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="enterpriseName" property="enterprisename"/> |
| | | <result column="representative" property="representative"/> |
| | | <result column=" |
| | | regstsat" property=" |
| | | regstsat"/> |
| | | <result column="establishTime" property="establishtime"/> |
| | | <result column="registeredCapital" property="registeredcapital"/> |
| | | <result column="capital" property="capital"/> |
| | | <result column="organizationCode" property="organizationcode"/> |
| | | <result column="registrationNumber" property="registrationnumber"/> |
| | | <result column="identificationNumber" property="identificationnumber"/> |
| | | <result column="enterprises" property="enterprises"/> |
| | | <result column="address" property="address"/> |
| | | <result column="business" property="business"/> |
| | | <result column="region" property="region"/> |
| | | <result column="registration" property="registration"/> |
| | | <result column="industry" property="industry"/> |
| | | <result column="type" property="type"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPermitPage" resultMap="permitResultMap"> |
| | | select * from sys_permit where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.service; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface IPermitService extends IService<Permit> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param permit |
| | | * @return |
| | | */ |
| | | IPage<PermitVO> selectPermitPage(IPage<PermitVO> page, PermitVO permit); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.service.impl; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.permit.mapper.PermitMapper; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Service |
| | | public class PermitServiceImpl extends ServiceImpl<PermitMapper, Permit> implements IPermitService { |
| | | |
| | | @Override |
| | | public IPage<PermitVO> selectPermitPage(IPage<PermitVO> page, PermitVO permit) { |
| | | return page.setRecords(baseMapper.selectPermitPage(page, permit)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.permit.vo; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "PermitVO对象", description = "PermitVO对象") |
| | | public class PermitVO extends Permit { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springblade.modules.record.service.IRecordService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-record/record") |
| | | @Api(value = "", tags = "接口") |
| | | public class RecordController extends BladeController { |
| | | |
| | | private final IRecordService recordService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入record") |
| | | public R<Record> detail(Record record) { |
| | | Record detail = recordService.getOne(Condition.getQueryWrapper(record)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入record") |
| | | public R<IPage<Record>> list(Record record, Query query) { |
| | | IPage<Record> pages = recordService.page(Condition.getPage(query), Condition.getQueryWrapper(record)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入record") |
| | | public R<IPage<RecordVO>> page(RecordVO record, Query query) { |
| | | IPage<RecordVO> pages = recordService.selectRecordPage(Condition.getPage(query), record); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入record") |
| | | public R save(@Valid @RequestBody Record record) { |
| | | return R.status(recordService.save(record)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入record") |
| | | public R update(@Valid @RequestBody Record record) { |
| | | return R.status(recordService.updateById(record)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入record") |
| | | public R submit(@Valid @RequestBody Record record) { |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(recordService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.dto; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class RecordDTO extends Record { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @TableName("sys_record") |
| | | @ApiModel(value = "Record对象", description = "Record对象") |
| | | public class Record implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | /** |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | private String enterprisename; |
| | | /** |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | /** |
| | | * 登记状态 |
| | | */ |
| | | @ApiModelProperty(value = "登记状态") |
| | | private String |
| | | regstsat; |
| | | /** |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | private LocalDateTime establishtime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | /** |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | private String organizationcode; |
| | | /** |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | private String registrationnumber; |
| | | /** |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | private String identificationnumber; |
| | | /** |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | /** |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | /** |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | /** |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | /** |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | /** |
| | | * 状态 0:审核通过 1:审核不通过 2: 审核中 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中") |
| | | private String type; |
| | | /** |
| | | * 保安服务单位许可编号 |
| | | */ |
| | | @ApiModelProperty(value = "保安服务单位许可编号") |
| | | private String perid; |
| | | /** |
| | | * 许可发证机关 |
| | | */ |
| | | @ApiModelProperty(value = "许可发证机关") |
| | | private String offices; |
| | | /** |
| | | * 发证时间 |
| | | */ |
| | | @ApiModelProperty(value = "发证时间") |
| | | private LocalDateTime officetime; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.mapper; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface RecordMapper extends BaseMapper<Record> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param record |
| | | * @return |
| | | */ |
| | | List<RecordVO> selectRecordPage(IPage page, RecordVO record); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.record.mapper.RecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="recordResultMap" type="org.springblade.modules.record.entity.Record"> |
| | | <id column="id" property="id"/> |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="enterpriseName" property="enterprisename"/> |
| | | <result column="representative" property="representative"/> |
| | | <result column=" |
| | | regstsat" property=" |
| | | regstsat"/> |
| | | <result column="establishTime" property="establishtime"/> |
| | | <result column="registeredCapital" property="registeredcapital"/> |
| | | <result column="capital" property="capital"/> |
| | | <result column="organizationCode" property="organizationcode"/> |
| | | <result column="registrationNumber" property="registrationnumber"/> |
| | | <result column="identificationNumber" property="identificationnumber"/> |
| | | <result column="enterprises" property="enterprises"/> |
| | | <result column="address" property="address"/> |
| | | <result column="business" property="business"/> |
| | | <result column="region" property="region"/> |
| | | <result column="registration" property="registration"/> |
| | | <result column="industry" property="industry"/> |
| | | <result column="type" property="type"/> |
| | | <result column="perid" property="perid"/> |
| | | <result column="offices" property="offices"/> |
| | | <result column="officetime" property="officetime"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectRecordPage" resultMap="recordResultMap"> |
| | | select * from sys_record where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.service; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface IRecordService extends IService<Record> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param record |
| | | * @return |
| | | */ |
| | | IPage<RecordVO> selectRecordPage(IPage<RecordVO> page, RecordVO record); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.service.impl; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springblade.modules.record.mapper.RecordMapper; |
| | | import org.springblade.modules.record.service.IRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Service |
| | | public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService { |
| | | |
| | | @Override |
| | | public IPage<RecordVO> selectRecordPage(IPage<RecordVO> page, RecordVO record) { |
| | | return page.setRecords(baseMapper.selectRecordPage(page, record)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.record.vo; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "RecordVO对象", description = "RecordVO对象") |
| | | public class RecordVO extends Record { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-recordk/recordk") |
| | | @Api(value = "", tags = "接口") |
| | | public class RecordkController extends BladeController { |
| | | |
| | | private final IRecordkService recordkService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入recordk") |
| | | public R<Recordk> detail(Recordk recordk) { |
| | | Recordk detail = recordkService.getOne(Condition.getQueryWrapper(recordk)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<Recordk>> list(Recordk recordk, Query query) { |
| | | IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<RecordkVO>> page(RecordkVO recordk, Query query) { |
| | | IPage<RecordkVO> pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入recordk") |
| | | public R save(@Valid @RequestBody Recordk recordk) { |
| | | return R.status(recordkService.save(recordk)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入recordk") |
| | | public R update(@Valid @RequestBody Recordk recordk) { |
| | | return R.status(recordkService.updateById(recordk)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入recordk") |
| | | public R submit(@Valid @RequestBody Recordk recordk) { |
| | | return R.status(recordkService.saveOrUpdate(recordk)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(recordkService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.dto; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class RecordkDTO extends Recordk { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @TableName("sys_recordk") |
| | | @ApiModel(value = "Recordk对象", description = "Recordk对象") |
| | | public class Recordk implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | /** |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | private String enterprisename; |
| | | /** |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | /** |
| | | * 登记状态 |
| | | */ |
| | | @ApiModelProperty(value = "登记状态") |
| | | private String |
| | | regstsat; |
| | | /** |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | private LocalDateTime establishtime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | /** |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | private String organizationcode; |
| | | /** |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | private String registrationnumber; |
| | | /** |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | private String identificationnumber; |
| | | /** |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | /** |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | /** |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | /** |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | /** |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | /** |
| | | * 状态 0:审核通过 1:审核不通过 2: 审核中 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中") |
| | | private String type; |
| | | /** |
| | | * 保安服务单位许可编号 |
| | | */ |
| | | @ApiModelProperty(value = "保安服务单位许可编号") |
| | | private String perid; |
| | | /** |
| | | * 许可发证机关 |
| | | */ |
| | | @ApiModelProperty(value = "许可发证机关") |
| | | private String offices; |
| | | /** |
| | | * 发证时间 |
| | | */ |
| | | @ApiModelProperty(value = "发证时间") |
| | | private LocalDateTime officetime; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.mapper; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface RecordkMapper extends BaseMapper<Recordk> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param recordk |
| | | * @return |
| | | */ |
| | | List<RecordkVO> selectRecordkPage(IPage page, RecordkVO recordk); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.recordk.mapper.RecordkMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="recordkResultMap" type="org.springblade.modules.recordk.entity.Recordk"> |
| | | <id column="id" property="id"/> |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="enterpriseName" property="enterprisename"/> |
| | | <result column="representative" property="representative"/> |
| | | <result column=" |
| | | regstsat" property=" |
| | | regstsat"/> |
| | | <result column="establishTime" property="establishtime"/> |
| | | <result column="registeredCapital" property="registeredcapital"/> |
| | | <result column="capital" property="capital"/> |
| | | <result column="organizationCode" property="organizationcode"/> |
| | | <result column="registrationNumber" property="registrationnumber"/> |
| | | <result column="identificationNumber" property="identificationnumber"/> |
| | | <result column="enterprises" property="enterprises"/> |
| | | <result column="address" property="address"/> |
| | | <result column="business" property="business"/> |
| | | <result column="region" property="region"/> |
| | | <result column="registration" property="registration"/> |
| | | <result column="industry" property="industry"/> |
| | | <result column="type" property="type"/> |
| | | <result column="perid" property="perid"/> |
| | | <result column="offices" property="offices"/> |
| | | <result column="officetime" property="officetime"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectRecordkPage" resultMap="recordkResultMap"> |
| | | select * from sys_recordk where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.service; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface IRecordkService extends IService<Recordk> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param recordk |
| | | * @return |
| | | */ |
| | | IPage<RecordkVO> selectRecordkPage(IPage<RecordkVO> page, RecordkVO recordk); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.service.impl; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springblade.modules.recordk.mapper.RecordkMapper; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Service |
| | | public class RecordkServiceImpl extends ServiceImpl<RecordkMapper, Recordk> implements IRecordkService { |
| | | |
| | | @Override |
| | | public IPage<RecordkVO> selectRecordkPage(IPage<RecordkVO> page, RecordkVO recordk) { |
| | | return page.setRecords(baseMapper.selectRecordkPage(page, recordk)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.recordk.vo; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "RecordkVO对象", description = "RecordkVO对象") |
| | | public class RecordkVO extends Recordk { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-revoke/revoke") |
| | | @Api(value = "", tags = "接口") |
| | | public class RevokeController extends BladeController { |
| | | |
| | | private final IRevokeService revokeService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入revoke") |
| | | public R<Revoke> detail(Revoke revoke) { |
| | | Revoke detail = revokeService.getOne(Condition.getQueryWrapper(revoke)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入revoke") |
| | | public R<IPage<Revoke>> list(Revoke revoke, Query query) { |
| | | IPage<Revoke> pages = revokeService.page(Condition.getPage(query), Condition.getQueryWrapper(revoke)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入revoke") |
| | | public R<IPage<RevokeVO>> page(RevokeVO revoke, Query query) { |
| | | IPage<RevokeVO> pages = revokeService.selectRevokePage(Condition.getPage(query), revoke); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入revoke") |
| | | public R save(@Valid @RequestBody Revoke revoke) { |
| | | return R.status(revokeService.save(revoke)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入revoke") |
| | | public R update(@Valid @RequestBody Revoke revoke) { |
| | | return R.status(revokeService.updateById(revoke)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入revoke") |
| | | public R submit(@Valid @RequestBody Revoke revoke) { |
| | | return R.status(revokeService.saveOrUpdate(revoke)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(revokeService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.dto; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class RevokeDTO extends Revoke { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @TableName("sys_revoke") |
| | | @ApiModel(value = "Revoke对象", description = "Revoke对象") |
| | | public class Revoke implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | /** |
| | | * 企业名称 |
| | | */ |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("enterpriseName") |
| | | private String enterprisename; |
| | | /** |
| | | * 法定代表人 |
| | | */ |
| | | @ApiModelProperty(value = "法定代表人") |
| | | private String representative; |
| | | /** |
| | | * 登记状态 |
| | | */ |
| | | @ApiModelProperty(value = "登记状态") |
| | | private String |
| | | regstsat; |
| | | /** |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @TableField("establishTime") |
| | | private LocalDateTime establishtime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | /** |
| | | * 实缴资本 |
| | | */ |
| | | @ApiModelProperty(value = "实缴资本") |
| | | private String capital; |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "组织机构代码") |
| | | @TableField("organizationCode") |
| | | private String organizationcode; |
| | | /** |
| | | * 工商注册号 |
| | | */ |
| | | @ApiModelProperty(value = "工商注册号") |
| | | @TableField("registrationNumber") |
| | | private String registrationnumber; |
| | | /** |
| | | * 纳税人识别号 |
| | | */ |
| | | @ApiModelProperty(value = "纳税人识别号") |
| | | @TableField("identificationNumber") |
| | | private String identificationnumber; |
| | | /** |
| | | * 企业类型 |
| | | */ |
| | | @ApiModelProperty(value = "企业类型") |
| | | private String enterprises; |
| | | /** |
| | | * 注册地址 |
| | | */ |
| | | @ApiModelProperty(value = "注册地址") |
| | | private String address; |
| | | /** |
| | | * 经营范围 |
| | | */ |
| | | @ApiModelProperty(value = "经营范围") |
| | | private String business; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty(value = "所属地区") |
| | | private String region; |
| | | /** |
| | | * 登记机关 |
| | | */ |
| | | @ApiModelProperty(value = "登记机关") |
| | | private String registration; |
| | | /** |
| | | * 所属行业 |
| | | */ |
| | | @ApiModelProperty(value = "所属行业") |
| | | private String industry; |
| | | /** |
| | | * 状态 0:撤销通过 1:撤销不通过 2: 撤销中 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0:撤销通过 1:撤销不通过 2: 撤销中") |
| | | private String type; |
| | | /** |
| | | * 撤销原因 |
| | | */ |
| | | @ApiModelProperty(value = "撤销原因") |
| | | private String reason; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.mapper; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface RevokeMapper extends BaseMapper<Revoke> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param revoke |
| | | * @return |
| | | */ |
| | | List<RevokeVO> selectRevokePage(IPage page, RevokeVO revoke); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.revoke.mapper.RevokeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="revokeResultMap" type="org.springblade.modules.revoke.entity.Revoke"> |
| | | <id column="id" property="id"/> |
| | | <result column="creditCode" property="creditcode"/> |
| | | <result column="enterpriseName" property="enterprisename"/> |
| | | <result column="representative" property="representative"/> |
| | | <result column=" |
| | | regstsat" property=" |
| | | regstsat"/> |
| | | <result column="establishTime" property="establishtime"/> |
| | | <result column="registeredCapital" property="registeredcapital"/> |
| | | <result column="capital" property="capital"/> |
| | | <result column="organizationCode" property="organizationcode"/> |
| | | <result column="registrationNumber" property="registrationnumber"/> |
| | | <result column="identificationNumber" property="identificationnumber"/> |
| | | <result column="enterprises" property="enterprises"/> |
| | | <result column="address" property="address"/> |
| | | <result column="business" property="business"/> |
| | | <result column="region" property="region"/> |
| | | <result column="registration" property="registration"/> |
| | | <result column="industry" property="industry"/> |
| | | <result column="type" property="type"/> |
| | | <result column="reason" property="reason"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectRevokePage" resultMap="revokeResultMap"> |
| | | select * from sys_revoke where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.service; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | public interface IRevokeService extends IService<Revoke> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param revoke |
| | | * @return |
| | | */ |
| | | IPage<RevokeVO> selectRevokePage(IPage<RevokeVO> page, RevokeVO revoke); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.service.impl; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springblade.modules.revoke.mapper.RevokeMapper; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Service |
| | | public class RevokeServiceImpl extends ServiceImpl<RevokeMapper, Revoke> implements IRevokeService { |
| | | |
| | | @Override |
| | | public IPage<RevokeVO> selectRevokePage(IPage<RevokeVO> page, RevokeVO revoke) { |
| | | return page.setRecords(baseMapper.selectRevokePage(page, revoke)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.revoke.vo; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "RevokeVO对象", description = "RevokeVO对象") |
| | | public class RevokeVO extends Revoke { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |