Commit 0a5256ff authored by hongguangwu's avatar hongguangwu

MVP1.6.7-省市县等

parent 1d2273a4
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -103,4 +104,26 @@ public class TEmpContactInfo extends BaseEntity {
@Schema(description = "联系电话")
private String tel;
/**
* 联系地址省
*/
@ExcelAttribute(name = "联系地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址省")
private String relationProvince;
/**
* 联系地址市
*/
@ExcelAttribute(name = "联系地址市",isArea = true,parentField = "relationProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址市")
private String relationCity;
/**
* 联系地址县
*/
@ExcelAttribute(name = "联系地址县",isArea = true,parentField = "relationCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址县")
private String relationTown;
}
......@@ -16,7 +16,9 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -25,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
......@@ -442,6 +445,82 @@ public class TEmployeeInfo extends BaseEntity {
@TableField(exist = false)
private String leaveTimeEnd;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 通信地址省
*/
@ExcelAttribute(name = "通信地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址县")
private String contactTown;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("封面抬头")
private String invoiceTitle;
@Schema(description = "社保状态多个")
@TableField(exist = false)
private String[] socialStatusArray;
......
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -120,5 +121,27 @@ public class TPreEmpContactInfo extends BaseEntity {
@Schema(description = "联系电话")
private String tel;
/**
* 联系地址省
*/
@ExcelAttribute(name = "联系地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址省")
private String relationProvince;
/**
* 联系地址市
*/
@ExcelAttribute(name = "联系地址市",isArea = true,parentField = "relationProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址市")
private String relationCity;
/**
* 联系地址县
*/
@ExcelAttribute(name = "联系地址县",isArea = true,parentField = "relationCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址县")
private String relationTown;
}
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -405,6 +406,82 @@ public class TPreEmployeeInfo extends BaseEntity {
@Schema(description = "通信地址")
private String contactAddress;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 通信地址省
*/
@ExcelAttribute(name = "通信地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址县")
private String contactTown;
/**
* 是否为首份工作 0是/1否
......
......@@ -79,8 +79,9 @@ public class FileUploadController {
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domainId);
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId
, @RequestParam(required = false) String attaName) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domainId,attaName);
}
/**
......
......@@ -17,7 +17,7 @@ public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId, String attaName) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
}
......@@ -14,7 +14,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
......@@ -40,7 +39,7 @@ public class FileUploadServiceImpl implements FileUploadService {
private final QrCodeUtil codeUtil;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId, String attaName) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
......@@ -84,6 +83,9 @@ public class FileUploadServiceImpl implements FileUploadService {
null);
attaInfo.setCreateBy(user.getId());
attaInfo.setCreateName(user.getNickname());
if (Common.isNotNull(attaName)) {
attaInfo.setAttaName(attaName);
}
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
......
......@@ -36,6 +36,10 @@
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="relationProvince" column="RELATION_PROVINCE"/>
<result property="relationCity" column="RELATION_CITY"/>
<result property="relationTown" column="RELATION_TOWN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -48,7 +52,11 @@
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
a.UPDATE_TIME,
a.RELATION_PROVINCE,
a.RELATION_CITY,
a.RELATION_TOWN
</sql>
<sql id="tEmpContactInfo_where">
<if test="tEmpContactInfo != null">
......
......@@ -77,6 +77,18 @@
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
</resultMap>
<resultMap id="tEmployeeExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO">
......@@ -236,7 +248,18 @@
a.LEAVE_REMARK,
a.CONTACT_ADDRESS,
a.FIRST_WORK_FLAG,
a.HAVE_QUALIFICATION
a.HAVE_QUALIFICATION,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN
</sql>
<sql id="Base_Export_List">
......
......@@ -38,6 +38,10 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="oldId" column="OLD_ID"/>
<result property="relationProvince" column="RELATION_PROVINCE"/>
<result property="relationCity" column="RELATION_CITY"/>
<result property="relationTown" column="RELATION_TOWN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -53,7 +57,11 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.OLD_ID,
a.UPDATE_TIME
a.UPDATE_TIME,
a.RELATION_PROVINCE,
a.RELATION_CITY,
a.RELATION_TOWN
</sql>
<sql id="tPreEmpContactInfo_where">
<if test="tPreEmpContactInfo != null">
......
......@@ -78,6 +78,18 @@
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
<result property="oldId" column="OLD_ID"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -133,7 +145,18 @@
a.CONTACT_ADDRESS,
a.FIRST_WORK_FLAG,
a.OLD_ID,
a.HAVE_QUALIFICATION
a.HAVE_QUALIFICATION,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN
</sql>
<sql id="tPreEmployeeInfo_where">
<if test="tPreEmployeeInfo != null">
......
......@@ -129,6 +129,22 @@ public class TCheckBankNoController {
return tCheckBankNoService.checkBankNoTwo(checkBankNo.getName(),checkBankNo.getBankNo());
}
/**
* @param empName 姓名
* @param bankNo 银行卡号
* @param deptId 项目id
* @Description: C端预入职银行卡号校验
* @Author: hgw
* @Date: 2024/7/16 14:58
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "C端预入职银行卡号校验")
@SysLog("C端预入职银行卡号校验" )
@GetMapping("/checkPreBankNo" )
public R<String> checkPreBankNo(@RequestParam String empName,@RequestParam String bankNo, @RequestParam String deptId) {
return tCheckBankNoService.checkPreBankNo(empName, bankNo, deptId);
}
/**
* @Description: 批量银行卡号校验
* @Author: hgw
......
......@@ -48,6 +48,14 @@ public interface TCheckBankNoService extends IService<TCheckBankNo> {
CheckBankNoVo checkBankNoTwo(String name, String cardNo);
/**
* @Description: C端预入职银行卡号校验
* @Author: hgw
* @Date: 2024/7/16 15:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> checkPreBankNo(String empName, String bankNo, String deptId);
/**
* @param list
* @Description:批量校验卡号
......
......@@ -24,10 +24,13 @@ import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.constant.ChecksConstants;
import com.yifu.cloud.plus.v1.check.entity.TCanCheck;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum;
import com.yifu.cloud.plus.v1.check.mapper.TCheckBankNoMapper;
import com.yifu.cloud.plus.v1.check.service.TCanCheckService;
import com.yifu.cloud.plus.v1.check.service.TCheckBankNoService;
import com.yifu.cloud.plus.v1.check.service.TPreEmpCheckNumService;
import com.yifu.cloud.plus.v1.check.utils.ChecksUtil;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoThreeVo;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
......@@ -60,6 +63,7 @@ import java.util.concurrent.*;
public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCheckBankNo> implements TCheckBankNoService {
private final TCanCheckService canCheckService;
private final TPreEmpCheckNumService tPreEmpCheckNumService;
@Override
public R<TCheckBankNo> checkBankNo(String name, String cardNo) {
......@@ -106,6 +110,60 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
return vo;
}
}
@Override
public R<String> checkPreBankNo(String empName, String bankNo, String deptId) {
if (Common.isEmpty(empName) || Common.isEmpty(bankNo)){
return R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR));
}
synchronized (this){
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo,bankNo)
.eq(TCheckBankNo::getName,empName)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkBankNo)){
if (CommonConstants.ZERO_ONE.equals(checkBankNo.getResult())) {
return R.ok();
} else {
return R.failed(checkBankNo.getRemark());
}
}
boolean canCheck = canCheckService.getCanCheck();
String nowDay = DateUtil.getThisDay();
if (canCheck) {
TPreEmpCheckNum nowDayNum = tPreEmpCheckNumService.getTPreEmpCheckNum(deptId, nowDay);
if (nowDayNum == null) {
nowDayNum = new TPreEmpCheckNum();
nowDayNum.setCreateDay(nowDay);
nowDayNum.setDeptId(deptId);
nowDayNum.setCanApiNum(1000);
nowDayNum.setApiNum(1);
tPreEmpCheckNumService.save(nowDayNum);
} else {
if (nowDayNum.getApiNum() >= nowDayNum.getCanApiNum()) {
return R.failed("该项目当日总条数:" + nowDayNum.getCanApiNum() + "已到达上限!");
} else {
nowDayNum.setApiNum(nowDayNum.getApiNum() + 1);
tPreEmpCheckNumService.updateById(nowDayNum);
}
}
}
R<TCheckBankNo> resR = ChecksUtil.checkBankNoTwo(empName,bankNo,canCheckService.getCanCheck());
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
baseMapper.insert(resR.getData());
checkBankNo = resR.getData();
if (CommonConstants.ZERO_ONE.equals(checkBankNo.getResult())) {
return R.ok();
} else {
return R.failed(checkBankNo.getRemark());
}
} else {
return R.failed("校验卡号失败,校验服务未返回结果!");
}
}
}
@Override
public CheckBankNoVo checkBankNoTwo(String name, String cardNo) {
CheckBankNoVo vo = new CheckBankNoVo();
......
......@@ -45,6 +45,7 @@ security:
- /checkBankNo/**
- /tcheckidcard/checkPreEmpIdCard
- /tcheckmobile/checkPrePhone
- /tcheckbankno/checkPreBankNo
spring:
......
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