Commit 34aa0c21 authored by fangxinjiang's avatar fangxinjiang

权限配置页面

parent 42b7ef7e
...@@ -68,7 +68,7 @@ public class TEmployeeContractAreaRes extends BaseEntity { ...@@ -68,7 +68,7 @@ public class TEmployeeContractAreaRes extends BaseEntity {
/** /**
* 档案-省 * 档案-省
*/ */
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省不能为空") @ExcelAttribute(name = "档案-省",isArea = true,isNotEmpty = true, errorInfo = "档案-省不能为空")
@NotBlank(message = "档案-省不能为空") @NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
@Schema(description = "档案-省") @Schema(description = "档案-省")
...@@ -76,14 +76,14 @@ public class TEmployeeContractAreaRes extends BaseEntity { ...@@ -76,14 +76,14 @@ public class TEmployeeContractAreaRes extends BaseEntity {
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @ExcelAttribute(name = "档案-市",isArea = true,parentField = "fileProvince")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
private Integer fileCity; private Integer fileCity;
/** /**
* 档案-县 * 档案-县
*/ */
@ExcelAttribute(name = "档案-县") @ExcelAttribute(name = "档案-县",isArea = true,parentField = "fileCity")
@ExcelProperty("档案-县") @ExcelProperty("档案-县")
@Schema(description = "档案-县") @Schema(description = "档案-县")
private Integer fileTown; private Integer fileTown;
...@@ -94,7 +94,7 @@ public class TEmployeeContractAreaRes extends BaseEntity { ...@@ -94,7 +94,7 @@ public class TEmployeeContractAreaRes extends BaseEntity {
@ExcelAttribute(name = "审核人所在部门") @ExcelAttribute(name = "审核人所在部门")
@ExcelProperty("办审核人所在部门") @ExcelProperty("办审核人所在部门")
@Schema(description = "审核人所在部门") @Schema(description = "审核人所在部门")
private Integer organName; private String organName;
/** /**
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
...@@ -40,45 +41,51 @@ public class TEmpContractAreaExportVo implements Serializable { ...@@ -40,45 +41,51 @@ public class TEmpContractAreaExportVo implements Serializable {
/** /**
* 登录人姓名 * 登录人姓名
*/ */
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人") @ExcelProperty("审核人")
@Schema(description = "审核人") @Schema(description = "审核人")
private String userName; private String userName;
/** /**
* 档案-省 * 档案-省
*/ */
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省不能为空") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-省",isArea = true, isNotEmpty = true, errorInfo = "档案-省不能为空")
@NotBlank(message = "档案-省不能为空") @NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
@Schema(description = "档案-省") @Schema(description = "档案-省")
private Integer fileProvince; private String fileProvince;
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-市",isArea = true,parentField = "fileProvince")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
private Integer fileCity; private String fileCity;
/** /**
* 档案-县 * 档案-县
*/ */
@ExcelAttribute(name = "档案-县") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-县",isArea = true,parentField = "fileCity")
@ExcelProperty("档案-县") @ExcelProperty("档案-县")
@Schema(description = "档案-县") @Schema(description = "档案-县")
private Integer fileTown; private String fileTown;
/** /**
* 申請人所在部门 * 申請人所在部门
*/ */
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "审核人所在部门") @ExcelAttribute(name = "审核人所在部门")
@ExcelProperty("办审核人所在部门") @ExcelProperty("办审核人所在部门")
@Schema(description = "审核人所在部门") @Schema(description = "审核人所在部门")
private Integer organName; private String organName;
/** /**
* 状态 0 启用 1 禁用 * 状态 0 启用 1 禁用
*/ */
@ExcelAttribute(name = "授权状态") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "授权状态",readConverterExp = "0=启用,1=禁用")
@ExcelProperty("授权状态") @ExcelProperty("授权状态")
@Schema(description = "授权状态:0 启用 1 禁用") @Schema(description = "授权状态:0 启用 1 禁用")
private String status; private String status;
......
...@@ -63,20 +63,20 @@ public class TEmployeeContractAreaResVo extends RowIndex implements Serializable ...@@ -63,20 +63,20 @@ public class TEmployeeContractAreaResVo extends RowIndex implements Serializable
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省 不能为空") @ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省 不能为空")
@Schema(description = "档案-省") @Schema(description = "档案-省")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
private Integer fileProvince; private String fileProvince;
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @ExcelAttribute(name = "档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
private Integer fileCity; private String fileCity;
/** /**
* 档案-县 * 档案-县
*/ */
@ExcelAttribute(name = "档案-县") @ExcelAttribute(name = "档案-县")
@Schema(description = "档案-县") @Schema(description = "档案-县")
@ExcelProperty("档案-县") @ExcelProperty("档案-县")
private Integer fileTown; private String fileTown;
} }
...@@ -141,7 +141,7 @@ public class TEmployeeContractAreaResController { ...@@ -141,7 +141,7 @@ public class TEmployeeContractAreaResController {
*/ */
@Operation(summary = "通过id启用或禁用合同地市权限配置表", description = "通过id启用或禁用(0 启用,1禁用)合同地市权限配置表:hasPermission('temployeecontractareares_edit')") @Operation(summary = "通过id启用或禁用合同地市权限配置表", description = "通过id启用或禁用(0 启用,1禁用)合同地市权限配置表:hasPermission('temployeecontractareares_edit')")
@SysLog("通过id启用或禁用合同地市权限配置表") @SysLog("通过id启用或禁用合同地市权限配置表")
@DeleteMapping("/updateStatus") @PutMapping("/updateStatus")
@PreAuthorize("@pms.hasPermission('temployeecontractareares_edit')") @PreAuthorize("@pms.hasPermission('temployeecontractareares_edit')")
public R<Boolean> removeById(@RequestParam(name = "id",required = true) String id, public R<Boolean> removeById(@RequestParam(name = "id",required = true) String id,
@RequestParam(name = "status",required = true) String status) { @RequestParam(name = "status",required = true) String status) {
......
...@@ -86,7 +86,7 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo ...@@ -86,7 +86,7 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8)); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list); //EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TEmployeeContractAreaRes.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TEmpContractAreaExportVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
......
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
AND a.FILE_TOWN = #{tEmployeeContractAreaRes.fileTown} AND a.FILE_TOWN = #{tEmployeeContractAreaRes.fileTown}
</if> </if>
<if test="tEmployeeContractAreaRes.status!= null"> <if test="tEmployeeContractAreaRes.status!= null">
AND a.status like CONCAT(#{tInsuranceAreaRes.status},'%') AND a.status like CONCAT(#{tEmployeeContractAreaRes.status},'%')
</if> </if>
<if test="tEmployeeContractAreaRes.userName != null"> <if test="tEmployeeContractAreaRes.userName != null">
AND a.USER_NAME like CONCAT(#{tInsuranceAreaRes.userName},'%') AND a.USER_NAME like CONCAT(#{tEmployeeContractAreaRes.userName},'%')
</if> </if>
<if test="tEmployeeContractAreaRes.organName != null"> <if test="tEmployeeContractAreaRes.organName != null">
AND a.ORGAN_NAME like CONCAT(#{tInsuranceAreaRes.organName},'%') AND a.ORGAN_NAME like CONCAT(#{tEmployeeContractAreaRes.organName},'%')
</if> </if>
</if> </if>
</sql> </sql>
......
...@@ -68,7 +68,7 @@ public class TInsuranceAreaRes extends BaseEntity { ...@@ -68,7 +68,7 @@ public class TInsuranceAreaRes extends BaseEntity {
/** /**
* 档案-省 * 档案-省
*/ */
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省不能为空") @ExcelAttribute(name = "档案-省",isArea = true, isNotEmpty = true, errorInfo = "档案-省不能为空")
@NotBlank(message = "档案-省不能为空") @NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
@Schema(description = "档案-省") @Schema(description = "档案-省")
...@@ -76,7 +76,7 @@ public class TInsuranceAreaRes extends BaseEntity { ...@@ -76,7 +76,7 @@ public class TInsuranceAreaRes extends BaseEntity {
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @ExcelAttribute(name = "档案-市",isArea = true,parentField = "province")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
private Integer city; private Integer city;
...@@ -88,7 +88,7 @@ public class TInsuranceAreaRes extends BaseEntity { ...@@ -88,7 +88,7 @@ public class TInsuranceAreaRes extends BaseEntity {
@ExcelAttribute(name = "办理人所在部门") @ExcelAttribute(name = "办理人所在部门")
@ExcelProperty("办理人所在部门") @ExcelProperty("办理人所在部门")
@Schema(description = "办理人所在部门") @Schema(description = "办理人所在部门")
private Integer organName; private String organName;
/** /**
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
...@@ -41,39 +42,44 @@ public class TInsuranceAreaExportVo implements Serializable { ...@@ -41,39 +42,44 @@ public class TInsuranceAreaExportVo implements Serializable {
/** /**
* 登录人姓名 * 登录人姓名
*/ */
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人") @ExcelProperty("办理人")
@Schema(description = "办理人") @Schema(description = "办理人")
private String userName; private String userName;
/** /**
* 档案-省 * 档案-省
*/ */
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省不能为空") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-省", isArea = true)
@NotBlank(message = "档案-省不能为空") @NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
@Schema(description = "档案-省") @Schema(description = "档案-省")
private Integer province; private String province;
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-市",isArea = true, parentField = "province")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
private Integer city; private String city;
/** /**
* 申請人所在部门 * 申請人所在部门
*/ */
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "办理人所在部门") @ExcelAttribute(name = "办理人所在部门")
@ExcelProperty("办理人所在部门") @ExcelProperty("办理人所在部门")
@Schema(description = "办理人所在部门") @Schema(description = "办理人所在部门")
private Integer organName; private String organName;
/** /**
* 状态 0 启用 1 禁用 * 状态 0 启用 1 禁用
*/ */
@ExcelAttribute(name = "授权状态") @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "授权状态",readConverterExp = "0=启用,1=禁用")
@ExcelProperty("授权状态") @ExcelProperty("授权状态")
@Schema(description = "授权状态:0 启用 1 禁用") @Schema(description = "授权状态:0 启用 1 禁用")
private String status; private String status;
......
...@@ -66,13 +66,13 @@ public class TInsuranceAreaResVo extends RowIndex implements Serializable { ...@@ -66,13 +66,13 @@ public class TInsuranceAreaResVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省 不能为空") @ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省 不能为空")
@Schema(description = "档案-省") @Schema(description = "档案-省")
@ExcelProperty("档案-省") @ExcelProperty("档案-省")
private Integer province; private String province;
/** /**
* 档案-市 * 档案-市
*/ */
@ExcelAttribute(name = "档案-市") @ExcelAttribute(name = "档案-市")
@Schema(description = "档案-市") @Schema(description = "档案-市")
@ExcelProperty("档案-市") @ExcelProperty("档案-市")
private Integer city; private String city;
} }
...@@ -152,9 +152,9 @@ public class TInsuranceAreaResController { ...@@ -152,9 +152,9 @@ public class TInsuranceAreaResController {
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id启用或禁用商险地市权限配置表", description = "通过id启用或禁用(0 启用,1禁用)商险地市权限配置表:hasPermission('tinsuranceareares_del')") @Operation(summary = "通过id启用或禁用商险地市权限配置表", description = "通过id启用或禁用(0 启用,1禁用)商险地市权限配置表:hasPermission('tinsuranceareares_edit')")
@SysLog("通过id启用或禁用商险地市权限配置表") @SysLog("通过id启用或禁用商险地市权限配置表")
@DeleteMapping("/updateStatus") @PutMapping("/updateStatus")
@PreAuthorize("@pms.hasPermission('tinsuranceareares_edit')") @PreAuthorize("@pms.hasPermission('tinsuranceareares_edit')")
public R<Boolean> removeById(@RequestParam(name = "id",required = true) String id, public R<Boolean> removeById(@RequestParam(name = "id",required = true) String id,
@RequestParam(name = "status",required = true) String status) { @RequestParam(name = "status",required = true) String status) {
......
...@@ -86,7 +86,7 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM ...@@ -86,7 +86,7 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8)); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list); //EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceAreaRes.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceAreaExportVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment