| | |
| | | package com.gkhy.web.controller.system; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/user/profile") |
| | | @Api(tags = "基础信息修改") |
| | | public class SysProfileController extends BaseController |
| | | { |
| | | @Autowired |
| | |
| | | */ |
| | | @Log(title = "个人信息", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updatePwd") |
| | | public AjaxResult updatePwd(String oldPassword, String newPassword) |
| | | @ApiOperation(value = "修改密码") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "oldPassword", dataType = "String", required = true, value = "原密码"), |
| | | @ApiImplicitParam(paramType = "query", name = "newPassword", dataType = "String", required = true, value = "新密码") |
| | | }) |
| | | public AjaxResult updatePwd(@RequestParam("oldPassword") String oldPassword, @RequestParam("newPassword")String newPassword) |
| | | { |
| | | LoginUser loginUser = getLoginUser(); |
| | | String userName = loginUser.getUsername(); |
| | |
| | | { |
| | | return error("新密码不能与旧密码相同"); |
| | | } |
| | | // 检查新密码复杂性 |
| | | if (!isValidPassword(newPassword)) { |
| | | return error("新密码必须包含数字和字母,并且可以包含特殊符号,长度至少为8个字符"); |
| | | } |
| | | |
| | | newPassword = SecurityUtils.encryptPassword(newPassword); |
| | | if (userService.resetUserPwd(userName, newPassword) > 0) |
| | | { |
| | |
| | | return error("修改密码异常,请联系管理员"); |
| | | } |
| | | |
| | | // 添加密码复杂性检查方法 |
| | | private static boolean isValidPassword(String password) { |
| | | // 正则表达式检查密码是否包含数字和字母,并且长度至少为8个字符 |
| | | //String passwordPattern = "^(?=.*[0-9])(?=.*[a-zA-Z]).{8,}$"; |
| | | String passwordPattern = "^(?=.*[0-9])(?=.*[a-zA-Z])[a-zA-Z0-9@#$%^&+=]{8,}$"; |
| | | return password.matches(passwordPattern); |
| | | } |
| | | /** |
| | | * 头像上传 |
| | | */ |
| | |
| | | @ApiModelProperty(value = "计费标准") |
| | | private String freightBasis; |
| | | |
| | | @ApiModelProperty(value = "计费标准说明") |
| | | private String billingInstructions; |
| | | |
| | | /** 计费时长 */ |
| | | @ApiModelProperty(value = "计费时长") |
| | | private BigDecimal billingDuration; |
| | |
| | | @ApiModelProperty(value = "卡号") |
| | | private String bankCard; |
| | | |
| | | @ApiModelProperty(value = "应纳税所得额") |
| | | private BigDecimal taxableIncome; |
| | | |
| | | @ApiModelProperty(value = "应缴个税") |
| | | private BigDecimal incomeTaxPayable; |
| | | |
| | | @ApiModelProperty(value = "专家费(税前)") |
| | | private BigDecimal taxExpertFee; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("big_classify") |
| | | private Long bigClassify; |
| | | |
| | | @ApiModelProperty("大类别名称") |
| | | @TableField(exist = false) |
| | | private String bigClassifyName; |
| | | |
| | | @NotNull(message ="小类别不能为空" ) |
| | | @ApiModelProperty("小类别id") |
| | | @TableField("small_classify") |
| | |
| | | @NotBlank(message = "计费标准不能为空") |
| | | private String freightBasis; |
| | | |
| | | @ApiModelProperty(value = "计费标准说明") |
| | | private String billingInstructions; |
| | | |
| | | /** 计费时长 */ |
| | | @ApiModelProperty(value = "计费时长") |
| | | @NotNull(message = "计费时长不能为空") |
| | | private BigDecimal billingDuration; |
| | | |
| | | /** 税后金额 */ |
| | | @ApiModelProperty(value = "税后金额") |
| | | @NotNull(message = "税后金额不能为空") |
| | | private BigDecimal afterTaxAmount; |
| | | |
| | | /** 开户行 */ |
| | | @ApiModelProperty(value = "开户行") |
| | |
| | | @NotBlank(message = "卡号不能为空") |
| | | private String bankCard; |
| | | |
| | | @ApiModelProperty(value = "税后金额") |
| | | private BigDecimal afterTaxAmount; |
| | | |
| | | @ApiModelProperty(value = "应纳税所得额") |
| | | private BigDecimal taxableIncome; |
| | | |
| | | @ApiModelProperty(value = "应缴个税") |
| | | private BigDecimal incomeTaxPayable; |
| | | |
| | | @ApiModelProperty(value = "专家费(税前)") |
| | | @NotNull(message = "专家费不能为空") |
| | | private BigDecimal taxExpertFee; |
| | | |
| | | |
| | | |
| | | @Data |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "项目预计结束日期") |
| | | private Date projectDateEnd; |
| | | |
| | | @ApiModelProperty(value = "工作类别") |
| | | private String jobCategory; |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "评估状态0未评估1已评估") |
| | | private Long evaluationState; |
| | | |
| | | @ApiModelProperty(value = "一级分类名称") |
| | | private String bigClassifyName; |
| | | } |
| | |
| | | @ApiModelProperty(value = "计费标准") |
| | | private String freightBasis; |
| | | |
| | | @ApiModelProperty(value = "计费标准说明") |
| | | private String billingInstructions; |
| | | |
| | | /** 计费时长 */ |
| | | @ApiModelProperty(value = "计费时长") |
| | | private BigDecimal billingDuration; |
| | |
| | | @ApiModelProperty(value = "卡号") |
| | | private String bankCard; |
| | | |
| | | @ApiModelProperty(value = "应纳税所得额") |
| | | private BigDecimal taxableIncome; |
| | | |
| | | @ApiModelProperty(value = "应缴个税") |
| | | private BigDecimal incomeTaxPayable; |
| | | |
| | | @ApiModelProperty(value = "专家费(税前)") |
| | | private BigDecimal taxExpertFee; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("审批状态(0申请提交,1待审核,2审批通过,3审批不通过)") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("大类别名称") |
| | | private String bigClassifyName; |
| | | |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("专家领域") |
| | | private String domain; |
| | | |
| | | } |
| | |
| | | */ |
| | | List<SysExpertInfo> expertInfoList(SysExpertInfo expertInfo); |
| | | |
| | | List<SysExpertInfo> expertInfoListV2 (SysExpertInfo expertInfo); |
| | | |
| | | /** |
| | | * 根据id card获取专家信息 |
| | | * @param idCard |
| | |
| | | projectDetailResp.setProjectName(projectManagement.getProjectName()); |
| | | projectDetailResp.setProjectDateStart(projectManagement.getProjectDateStart()); |
| | | projectDetailResp.setProjectDateEnd(projectManagement.getProjectDateEnd()); |
| | | if (StringUtils.isNotEmpty(projectManagement.getJobCategory())){ |
| | | projectDetailResp.setJobCategory(projectManagement.getJobCategory()); |
| | | } |
| | | SysExpertInfo sysExpertInfo = sysExpertInfoMapper.selectById(projectDetailResp.getExpertId()); |
| | | if (sysExpertInfo != null){ |
| | | projectDetailResp.setTitle(sysExpertInfo.getTitle()); |
| | | projectDetailResp.setJob(sysExpertInfo.getJob()); |
| | | |
| | | } |
| | | |
| | | } |
| | | return projectDetailResp; |
| | | } |
| | |
| | | return projectManagement; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public List<SysExpertInfo> exportInfoList(SysExpertInfo expertInfo) { |
| | | // |
| | | |
| | | return baseMapper.expertInfoList(expertInfo); |
| | | return baseMapper.expertInfoListV2(expertInfo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <result property="afterTaxAmount" column="after_tax_amount" /> |
| | | <result property="openBank" column="open_bank" /> |
| | | <result property="bankCard" column="bank_card" /> |
| | | <result property="taxableIncome" column="taxable_income" /> |
| | | <result property="incomeTaxPayable" column="income_tax_payable" /> |
| | | <result property="taxExpertFee" column="tax_expert_fee" /> |
| | | <result property="billingInstructions" column="billing_instructions" /> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.gkhy.system.domain.vo.response.ProjectExpertExportInfoRes" id="ProjectExpertExportInfoResult"> |
| | |
| | | <result property="afterTaxAmount" column="after_tax_amount" /> |
| | | <result property="openBank" column="open_bank" /> |
| | | <result property="bankCard" column="bank_card" /> |
| | | <result property="taxableIncome" column="taxable_income" /> |
| | | <result property="incomeTaxPayable" column="income_tax_payable" /> |
| | | <result property="taxExpertFee" column="tax_expert_fee" /> |
| | | <result property="billingInstructions" column="billing_instructions" /> |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <sql id="selectProjectExpertVo"> |
| | | select id, project_id, expert_id, score, evaluation_state, selection_mode, team_leader, del_flag, create_by, create_time, update_by, update_time, professional_ethics, impartial_honest, comprehensive_coordination, professional_ability, expressing_opinions, others, comprehensive_evaluation, major_dangers, general_hazards, content, |
| | | freight_basis, billing_duration, after_tax_amount, open_bank, bank_card from project_expert |
| | | freight_basis, billing_duration, after_tax_amount, open_bank, bank_card,taxable_income,income_tax_payable,tax_expert_fee,billing_instructions from project_expert |
| | | </sql> |
| | | <select id="selectProjectExpertList" parameterType="ProjectExpert" resultMap="ProjectExpertResult"> |
| | | <include refid="selectProjectExpertVo"/> |
| | |
| | | <if test="afterTaxAmount != null">after_tax_amount,</if> |
| | | <if test="openBank != null">open_bank,</if> |
| | | <if test="bankCard != null">bank_card,</if> |
| | | <if test="taxableIncome != null">taxable_income,</if> |
| | | <if test="incomeTaxPayable != null">income_tax_payable,</if> |
| | | <if test="taxExpertFee != null">tax_expert_fee,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="projectId != null">#{projectId},</if> |
| | |
| | | <if test="afterTaxAmount != null">#{afterTaxAmount},</if> |
| | | <if test="openBank != null">#{openBank},</if> |
| | | <if test="bankCard != null">#{bankCard},</if> |
| | | <if test="taxableIncome != null"> #{taxableIncome},</if> |
| | | <if test="incomeTaxPayable != null">#{incomeTaxPayable},</if> |
| | | <if test="taxExpertFee != null">#{taxExpertFee},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="afterTaxAmount != null">after_tax_amount = #{afterTaxAmount},</if> |
| | | <if test="openBank != null">open_bank = #{openBank},</if> |
| | | <if test="bankCard != null">bank_card = #{bankCard},</if> |
| | | <if test="taxableIncome != null">taxable_income = #{taxableIncome},</if> |
| | | <if test="incomeTaxPayable != null">income_tax_payable = #{incomeTaxPayable},</if> |
| | | <if test="taxExpertFee != null">tax_expert_fee = #{taxExpertFee},</if> |
| | | <if test="billingInstructions != null" > billing_instructions = #{billingInstructions},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | |
| | | <select id="projectExpertEvaluationList" parameterType="Long" resultType="com.gkhy.system.domain.vo.response.ProjectExpertEvaluationResp"> |
| | | select b.id ,b.expert_id expertId ,c.name,c.sex,c.id_card idCard,c.domain,c.rating_level ratingLevel, |
| | | b.selection_mode selectionMode,b.team_leader teamLeader,b.score,b.evaluation_state evaluationState |
| | | b.selection_mode selectionMode,b.team_leader teamLeader,b.score,b.evaluation_state evaluationState, |
| | | d.classify_name bigClassifyName |
| | | from project_expert b |
| | | left join sys_expert_info c on b.expert_id = c.id |
| | | left join sys_expert_classify d on c.big_classify = d.id |
| | | where b.del_flag = 0 and b.project_id = #{projectId} |
| | | order by b.team_leader asc , b.selection_mode asc, b.create_time desc |
| | | </select> |
| | |
| | | |
| | | <select id="projectExpertExportList" parameterType="Long" resultMap="ProjectExpertExportInfoResult"> |
| | | select a.project_name ,a.dept_name |
| | | ,c.name,c.id_card,c.name,c.job,c.title,c.company_name,b.freight_basis,b.billing_duration, b.after_tax_amount, b.open_bank, b.bank_card |
| | | ,c.name,c.id_card,c.name,c.job,c.title,c.company_name,b.freight_basis,b.billing_instructions, |
| | | b.billing_duration, b.after_tax_amount, b.open_bank, b.bank_card,b.taxable_income,b.income_tax_payable,b.tax_expert_fee |
| | | from project_management a |
| | | left join project_expert b on a.id = b.project_id and b.del_flag = 0 |
| | | left join sys_expert_info c on b.expert_id = c.id |
| | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="expertInfoListV2" resultType="com.gkhy.system.domain.SysExpertInfo"> |
| | | select a.id,a.name,a.sex,a.birthday,a.phone,a.title,a.degree,a.state,a.speciality,a.big_classify bigClassify,a.small_classify smallClassify,a.id_card idCard,a.company_name companyName,a.evidence, |
| | | a.domain,a.level,a.current_profession currentProfession,a.duty_status dutyStatus,a.support_direction_safety supportDirectionSafety, |
| | | a.support_direction_prevention supportDirectionPrevention,a.support_direction_emergency supportDirectionEmergency,a.create_time createTime, |
| | | a.rating_level ratingLevel,a.employment_date_start employmentDateStart,a.employment_date_end employmentDateEnd,a.expert_certificate expertCertificate,a.update_time updateTime ,b.classify_name as bigClassifyName from sys_expert_info a |
| | | left join sys_expert_classify b on a.big_classify = b.id |
| | | <where> |
| | | and a.del_flag = 0 |
| | | <if test="name != null and name != ''"> |
| | | and a.name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and a.phone like concat('%', #{phone}, '%') |
| | | </if> |
| | | <if test="idCard != null and idCard != ''"> |
| | | and a.id_card like concat('%', #{idCard}, '%') |
| | | </if> |
| | | <if test="domain != null and domain != ''"> |
| | | and a.domain = #{domain} |
| | | </if> |
| | | <if test="level != null and level != ''"> |
| | | and a.level = #{level} |
| | | </if> |
| | | <if test="bigClassify != null"> |
| | | and a.big_classify = #{bigClassify} |
| | | </if> |
| | | <if test="ratingLevel != null and ratingLevel != ''"> |
| | | and a.rating_level = #{ratingLevel} |
| | | </if> |
| | | <if test="smallClassify != null"> |
| | | and a.small_classify = #{smallClassify} |
| | | </if> |
| | | <if test="dutyStatus != null"> |
| | | and a.duty_status = #{dutyStatus} |
| | | </if> |
| | | <if test="state != null"> |
| | | and a.state = #{state} |
| | | </if> |
| | | <if test="deptId != null"> |
| | | and a.dept_id = #{deptId} |
| | | </if> |
| | | <if test="params.startTime != null "><!-- 开始时间检索 --> |
| | | and a.date_format(create_time,'%y%m%d') >= date_format(#{params.startTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null "><!-- 结束时间检索 --> |
| | | and a.date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | |
| | | </where> |
| | | order by a.create_time desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="checkIdcardUnique" resultType="com.gkhy.system.domain.SysExpertInfo"> |
| | | select id,name from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and del_flag=0 limit 1 |
| | | </select> |
| | |
| | | |
| | | |
| | | <select id="queryApprove" parameterType="com.gkhy.system.domain.vo.request.SysExpertSearchReqDto" resultType="com.gkhy.system.domain.vo.response.SysExpertSearchRep"> |
| | | select name,employment_date_start,employment_date_end,update_time,state from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and phone = #{phone} and del_flag=0 limit 1 |
| | | select a.name,a.employment_date_start employmentDateStart,a.employment_date_end employmentDateEnd, |
| | | a.update_time updateTime,a.state,b.classify_name bigClassifyName,a.id,a.domain |
| | | from sys_expert_info a |
| | | left join sys_expert_classify b on a.big_classify = b.id |
| | | where a.id_card=#{idCard} and a.dept_id = #{deptId} and a.phone = #{phone} and a.del_flag=0 limit 1 |
| | | </select> |
| | | |
| | | <select id="getExpertRound" parameterType="com.gkhy.system.domain.vo.request.SysExpertInfoRoundReq" |