Commit 98f0ceb5 authored by fangxinjiang's avatar fangxinjiang

Merge branch 'MVP-1.7.3-shuiyou' into MVP1.7.3-wxgz

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
parents a9fe2bab d9c53b3a
......@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件
* 25 户口本本人页26学信27预入职其他附件28户配置
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信)")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
......
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......
......@@ -107,7 +107,7 @@ public class TEmployeeContractInfo extends BaseEntity {
* 合同起始时间
*/
@NotBlank(message = "合同起始时间不能为空")
@ExcelAttribute(name = "合同起始时间", needExport = true)
@ExcelAttribute(name = "合同起始时间", needExport = true,isNotEmpty = true)
@Schema(description = "合同起始时间", name = "contractStart")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
private Date contractStart;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -42,4 +43,10 @@ public class TCompleteMonitorSearchVo extends TCompleteMonitor {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "在项人数区间开始")
private Integer inusePersonNumStart;
@Schema(description = "在项人数区间结束")
private Integer inusePersonNumEnd;
}
......@@ -16,6 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -49,4 +50,12 @@ public class TRiskMonitorSearchVo extends TRiskMonitor {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "在项人数区间开始")
@TableField(exist = false)
private Integer projectNumStart;
@Schema(description = "在项人数区间结束")
@TableField(exist = false)
private Integer projectNumEnd;
}
......@@ -57,15 +57,15 @@ public class TCompleteMonitorController {
/**
* 简单分页查询
* @param page 分页对象
* @param tCompleteMonitor 档案完整度监控
* @param searchVo 档案完整度监控
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCompleteMonitor>> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor) {
public R<IPage<TCompleteMonitor>> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tCompleteMonitor);
return new R<>(tCompleteMonitorService.getTCompleteMonitorPage(page,tCompleteMonitor));
menuUtil.setAuthSql(user, searchVo);
return new R<>(tCompleteMonitorService.getTCompleteMonitorPage(page,searchVo));
}
/**
......
......@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
......@@ -145,6 +144,20 @@ public class TEmpChangeInfoController {
,@RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getAllDeptPagePermission(page,departName, nameOrNo, customerId,flag));
}
/**
* 分页查询获取所有项目名称(缩小范围)
* @param page 分页对象
* @return
*/
@Operation(description = "分页查询缩小范围")
@GetMapping("/getDeptPagePermission" )
public R<IPage<TSettleDomain>> getDeptPagePermission(Page page, @RequestParam(required = false) String departName
,@RequestParam(required = false) String nameOrNo
,@RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getDeptPagePermission(page,departName, nameOrNo, customerId,flag));
}
/**
* 获取所有项目名称
* @return R
......
......@@ -22,12 +22,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -76,11 +76,21 @@ public class TSettleDomainController {
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
public R<IPage<TSettleDomain>> getTSettleDomainPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tSettleDomain);
if (Common.isNotNull(tSettleDomain.getAuthSql()) && tSettleDomain.getAuthSql().contains("or a.dept_id")) {
tSettleDomain.setAuthSql(tSettleDomain.getAuthSql().replace("or a.dept_id", "or a.id "));
long roleId = 1839501715787390978L;
boolean isSsc = false;
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) {
if (role == roleId) {
isSsc = true;
break;
}
}
if (!isSsc) {
menuUtil.setAuthSql(user, tSettleDomain);
if (Common.isNotNull(tSettleDomain.getAuthSql()) && tSettleDomain.getAuthSql().contains("or a.dept_id")) {
tSettleDomain.setAuthSql(tSettleDomain.getAuthSql().replace("or a.dept_id", "or a.id "));
}
}
return R.ok(tSettleDomainService.getPage(page, tSettleDomain));
}
......@@ -364,7 +374,8 @@ public class TSettleDomainController {
@PostMapping("/updateProjectInfo")
public R updateProjectInfo(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
......@@ -394,7 +405,8 @@ public class TSettleDomainController {
@PostMapping("/updateProjectStopStatus")
public R updateProjectStopStatus(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
......@@ -413,7 +425,8 @@ public class TSettleDomainController {
@PostMapping("/updateProjectServerTeam")
public R<Boolean> updateProjectServerTeam(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
......
......@@ -40,7 +40,7 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor);
/**
......
......@@ -24,7 +24,7 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor);
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor);
/**
* @Description: 详情
......
......@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoNewVO;
......@@ -86,7 +85,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
IPage<TSettleDomain> getAllDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag);
/**
* 分页获取项目名称缩小可见范围
*
* @author wzb
* @param page
* @param departName
* @param nameOrNo
* @param customerId
* @param flag
* @return {@link IPage< TSettleDomain>}
*/
IPage<TSettleDomain> getDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag);
R<Boolean> changeEmpProArcNew(TEmpChangeInfoNewVO changeVo);
......
......@@ -88,7 +88,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
* @return
*/
@Override
public IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor){
public IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor){
return baseMapper.getTCompleteMonitorPage(page,tCompleteMonitor);
}
......@@ -465,8 +465,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
ExcelWriterSheetBuilder writeSheet;
List<TMainExportAllVO> listWork;
Map<String, TMainExportAllVO> mapWork;
List<TMainExportAllVO> listContract;
Map<String, TMainExportAllVO> mapContract;
// List<TMainExportAllVO> listContract;
// Map<String, TMainExportAllVO> mapContract;
List<TMainExportAllVO> listEducation;
Map<String, TMainExportAllVO> mapEducation;
List<TMainExportAllVO> listBad;
......@@ -492,25 +492,25 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
for (TMainExportAllVO vo : list) {
empIdList.add(vo.getMainId());
}
listContract = baseMapper.getTEmpMainAllListByContract(empIdList);
// listContract = baseMapper.getTEmpMainAllListByContract(empIdList);
listEducation = baseMapper.getTEmpMainAllListByEducation(empIdList);
listBad = baseMapper.getTEmpMainAllListByBad(empIdList);
listDisability = baseMapper.getTEmpMainAllListByDisability(empIdList);
listWork = baseMapper.getTEmpMainAllListByWork(empIdList);
listFamily = baseMapper.getTEmpMainAllListByFamily(empIdList);
listProfessional = baseMapper.getTEmpMainAllListByProfessional(empIdList);
mapContract = new HashMap<>();
// mapContract = new HashMap<>();
mapEducation = new HashMap<>();
mapBad = new HashMap<>();
mapDisability = new HashMap<>();
mapWork = new HashMap<>();
mapFamily = new HashMap<>();
mapProfessional = new HashMap<>();
if (listContract != null && !listContract.isEmpty()) {
for (TMainExportAllVO vo : listContract) {
mapContract.putIfAbsent(vo.getMainId(), vo);
}
}
// if (listContract != null && !listContract.isEmpty()) {
// for (TMainExportAllVO vo : listContract) {
// mapContract.putIfAbsent(vo.getMainId(), vo);
// }
// }
if (listEducation != null && !listEducation.isEmpty()) {
for (TMainExportAllVO vo : listEducation) {
mapEducation.putIfAbsent(vo.getMainId(), vo);
......@@ -518,7 +518,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
if (listBad != null && !listBad.isEmpty()) {
for (TMainExportAllVO vo : listBad) {
mapEducation.putIfAbsent(vo.getMainId(), vo);
mapBad.putIfAbsent(vo.getMainId(), vo);
}
}
if (listDisability != null && !listDisability.isEmpty()) {
......@@ -542,14 +542,14 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
}
for (TMainExportAllVO vo : list) {
temp = mapContract.get(vo.getMainId());
if (temp != null) {
vo.setField26(temp.getField26());
vo.setField27(temp.getField27());
vo.setField28(temp.getField28());
vo.setField29(temp.getField29());
vo.setField30(temp.getField30());
}
// temp = mapContract.get(vo.getMainId());
// if (temp != null) {
// vo.setField26(temp.getField26());
// vo.setField27(temp.getField27());
// vo.setField28(temp.getField28());
// vo.setField29(temp.getField29());
// vo.setField30(temp.getField30());
// }
temp = mapEducation.get(vo.getMainId());
if (temp != null) {
vo.setField36(temp.getField36());
......
......@@ -368,6 +368,36 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
/**
* 分页获取项目名称缩小可见范围
*
* @author wzb
* @param page
* @param departName
* @param nameOrNo
* @param customerId
* @param flag
* @return {@link IPage< TSettleDomain>}
*/
@Override
public IPage<TSettleDomain> getDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag) {
YifuUser user = SecurityUtils.getUser();
String userId=user.getId();
// SSC开发组-1668092146875969537L 超管1
long roleId = 1668092146875969537L;
boolean isSsc = this.haveRole(user, roleId);
long roleIdMan = 1839501715787390978L;
boolean isAdmin =this.haveRole(user, roleIdMan);
if (!isSsc) {
isSsc = this.haveRole(user, 1L);
}
if (isSsc || isAdmin) {
userId = "-999";
}
return tSettleDomainMapper.getPagePerMission(page, userId, departName, nameOrNo, customerId, flag);
}
/**
* @Description: 检测是否有某个角色权限
* @Author: hgw
......
......@@ -85,6 +85,12 @@
<if test="tCompleteMonitor.afterIsComplete != null and tCompleteMonitor.afterIsComplete.trim() != ''">
AND a.AFTER_IS_COMPLETE = #{tCompleteMonitor.afterIsComplete}
</if>
<if test="tCompleteMonitor.inusePersonNumStart != null">
AND a.INUSE_PERSON_NUM <![CDATA[ >= ]]> #{tCompleteMonitor.inusePersonNumStart}
</if>
<if test="tCompleteMonitor.inusePersonNumEnd != null">
AND a.INUSE_PERSON_NUM <![CDATA[ <= ]]> #{tCompleteMonitor.inusePersonNumEnd}
</if>
<if test="tCompleteMonitor.authSql != null and tCompleteMonitor.authSql.trim() != ''">
${tCompleteMonitor.authSql}
</if>
......@@ -348,6 +354,7 @@
,e.FILE_PROVINCE field20,e.FILE_CITY field71,e.FILE_TOWN field72,if(e.status=0,'草稿','已审核') field21
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24,p.DEPT_NO field64
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,p.CONTRACT_TYPE field26,p.WORKING_HOURS field27,p.POST field28,p.ENJOIN_DATE field29,p.TRY_PERIOD field30
,p.EMP_LABEL field31
,ec.EMP_NAME field32,ec.RELATION_TYPE field33,ec.ADDRESS field34,ec.TEL field35
,if(e.IS_COLLEGE=0,'否','是') field39
......@@ -357,7 +364,8 @@
FROM t_complete_monitor a
left join t_employee_project p on a.DEPT_NO=p.DEPT_NO
left join t_employee_info e on p.EMP_ID=e.id
left join t_emp_contact_info ec on e.id=ec.EMP_ID
left join (select contact.EMP_NAME ,contact.RELATION_TYPE,contact.ADDRESS,contact.TEL,contact.EMP_ID from
t_emp_contact_info contact group by contact.EMP_ID) ec on e.id=ec.EMP_ID
<where>
p.DELETE_FLAG = '0' and p.PROJECT_STATUS = 0
<include refid="tCompleteMonitor_where"/>
......
......@@ -157,6 +157,12 @@
<if test="tRiskMonitor.riskType != null and tRiskMonitor.riskType.trim() != ''">
AND a.RISK_TYPE regexp #{tRiskMonitor.riskType}
</if>
<if test="tRiskMonitor.projectNumStart != null">
AND a.PROJECT_NUM <![CDATA[ >= ]]> #{tRiskMonitor.projectNumStart}
</if>
<if test="tRiskMonitor.projectNumEnd != null">
AND a.PROJECT_NUM <![CDATA[ <= ]]> #{tRiskMonitor.projectNumEnd}
</if>
<if test="tRiskMonitor.authSql != null and tRiskMonitor.authSql.trim() != ''">
${tRiskMonitor.authSql}
</if>
......
......@@ -320,7 +320,7 @@
FROM
t_settle_domain a
<if test="userId != null and userId.trim() != '-999'">
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPART_NO
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPART_NO and b.STATUS = '0'
</if>
WHERE a.DELETE_FLAG = '0'
/* 2023-6-12 11:12:15 hgw根据 */
......
......@@ -96,7 +96,8 @@ public class TCertInfoServiceImpl extends ServiceImpl<TCertInfoMapper, TCertInfo
// 导入字段封装
initBusiDict(otherMap, CommonConstants.ZERO_INT);
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
util1 = new ExcelUtil<>(TCertInfo.class);
util1.getJsonStringToList(jsonStr, initMapForImport(otherMap));
List<TCertInfo> list = util1.getEntityList();
......@@ -315,7 +316,8 @@ public class TCertInfoServiceImpl extends ServiceImpl<TCertInfoMapper, TCertInfo
// 导入字段封装
initBusiDict(otherMap, CommonConstants.ZERO_INT);
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
util = new ExcelUtil<>(TCertInfo.class);
util.getJsonStringToList(jsonStr, initMapForImport(otherMap));
List<TCertInfo> list = util.getEntityList();
......
......@@ -632,4 +632,6 @@ public interface CommonConstants {
List<String> socialInfoStatus = Stream.of("1","3","5","7").collect(Collectors.toList());
String USER_DIR = "user.dir";
String DOUBLE_LINE = "//";
}
......@@ -1619,6 +1619,15 @@ public class DateUtil {
return sf.format(new Date());
}
public static String getLastDay(){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.ISO_EXPANDED_DATE_FORMAT);
Calendar instance = Calendar.getInstance();
instance.setTime(new Date());
int lastDay = instance.getActualMaximum(Calendar.DAY_OF_MONTH);
instance.set(Calendar.DAY_OF_MONTH, lastDay);
return sf.format(instance.getTime());
}
/**
* @Description: 返回当前年月日字符串
* @Author: hgw
......
......@@ -118,7 +118,7 @@ public class SocialDaprUtils {
* @return
**/
public R<TPaymentVo> getPaymentSocialAndFound(TPaymentInfo infoVo) {
R<TPaymentVo> listVo = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/getPaymentSocialAndFound", JSON.toJSONString(infoVo), TPaymentInfo.class, SecurityConstants.FROM_IN);
R<TPaymentVo> listVo = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/getPaymentSocialAndFound", JSON.toJSONString(infoVo), TPaymentVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(listVo)){
return R.failed("查询人员缴费库数据失败!");
}
......
......@@ -68,6 +68,21 @@ public class UpmsDaprUtils {
return allUserVoR;
}
/**
* @Author fxj
* @Description 获取所有用户数据
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public R<AllUserNaVo> getAllUserIds() {
R<AllUserNaVo> allUserVoR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getAllUserIdDTO","", AllUserNaVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(allUserVoR)){
return R.failed("获取所有用户数据失败!");
}
return allUserVoR;
}
/**
* @Author fxj
* @Description 获取指定用户名对应用户IDs
......
package com.yifu.cloud.plus.v1.ekp.controller;
import com.icbc.api.IcbcApiException;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankCodeSet;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -109,4 +108,30 @@ public class IcbcTransactionFlowQueryController {
}
return icbcTransactionFlowQueryService.querybankinfo(cardNo);
}
/**
* 指令对账单明细下载
*
* @param
* @param
* @return
*/
@Operation(summary = "指令对账单明细下载", description = "指令对账单明细下载")
@PostMapping("/enterprisePayDowninstr")
public R getEnterprisePayDowninstr() {
return icbcTransactionFlowQueryService.getEnterprisePayDowninstr();
}
/**
* 电子回单下载功能
*
* @param
* @param
* @return
*/
@Operation(summary = "电子回单下载功能", description = "电子回单下载功能")
@PostMapping("/entermeatebillreceive")
public R getMeatebillreceive() {
return icbcTransactionFlowQueryService.getMeatebillreceive();
}
}
......@@ -60,7 +60,8 @@ public class TEkpSocialInfoController {
@PostMapping("/updateScoialStatus")
public R updateScoialStatus(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
......
......@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.IcbcApiException;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankCodeSet;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -31,4 +30,20 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
**/
R<EkpBankCodeSet> querybankinfo(String cardNo);
/**
* @Description: 查询账单明细文件名
* @Author: huyc
* @Date: 2024-12-12
* @return: R
**/
R getEnterprisePayDowninstr();
/**
* @Description: 电子回单下载功能
* @Author: huyc
* @Date: 2024-12-13
* @return: R
**/
R getMeatebillreceive();
}
......@@ -6,14 +6,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.icbc.api.DefaultIcbcClient;
import com.icbc.api.IcbcApiException;
import com.icbc.api.IcbcConstants;
import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1;
import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1;
import com.icbc.api.request.MybankEnterpriseAccountQuerybankinfoRequestV1;
import com.icbc.api.request.MybankEnterpriseTradeQhisdRequestV1;
import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.icbc.api.response.MybankEnterpriseTradeQhisdResponseV1;
import com.icbc.api.request.*;
import com.icbc.api.response.*;
import com.yifu.cloud.plus.v1.ekp.config.EkpEntryProperties;
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankCodeSet;
......@@ -22,7 +16,6 @@ import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpBankCodeSetService;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.ekp.vo.EKPEntryPushParam;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.micrometer.core.instrument.util.StringUtils;
......@@ -498,6 +491,87 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
@Override
public R getEnterprisePayDowninstr() {
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
MybankEnterprisePayDowninstrRequestV1.MybankEnterprisePayDowninstrRequestBizV1 bizContent =
new MybankEnterprisePayDowninstrRequestV1.MybankEnterprisePayDowninstrRequestBizV1();
MybankEnterprisePayDowninstrRequestV1 request = new MybankEnterprisePayDowninstrRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("DOWNINSTR");
bizContent.setTranDate("20241216");
bizContent.setTranTime("103231001");
bizContent.setBeginDate("20241216");
bizContent.setEndDate("20241216");
bizContent.setPayeeAccNo("6217788306000007495");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("WX1734341241340");
bizContent.setServiceCode("PAYENT");
// bizContent.setQryfSeqno("PAYENT411erji17023");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/pay/downinstr/V1");
request.setBizContent(bizContent);
MybankEnterprisePayDowninstrResponseV1 response = client.execute(request);
if (response.isSuccess()) {
// 业务成功处理
return R.ok();
} else {
return R.failed();
}
} catch (Exception e) {
e.printStackTrace();
}
return R.ok();
}
@Override
public R getMeatebillreceive() {
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
MybankEnterpriseAccountTradeinfoMeatebillreceiveRequestV1.MybankEnterpriseAccountDownebillRequesBizV1 bizContent =
new MybankEnterpriseAccountTradeinfoMeatebillreceiveRequestV1.MybankEnterpriseAccountDownebillRequesBizV1();
MybankEnterpriseAccountTradeinfoMeatebillreceiveRequestV1 request =
new MybankEnterpriseAccountTradeinfoMeatebillreceiveRequestV1();
bizContent.setTransCode("DownEBill");
bizContent.setBankCode("6217788306000007495");
bizContent.setCis("");
bizContent.setLoginId("");
bizContent.setTranDate("");
bizContent.setTranTime("");
bizContent.setfSeqno("");
bizContent.setAreaCode("");
bizContent.setNetCode("");
bizContent.setTellerNo("");
bizContent.setWorkDate("");
bizContent.setTranSerialNo("");
bizContent.setAcctNo("");
bizContent.setCurrencyType("");
bizContent.setReqReserved1("");
bizContent.setReqReserved2("");
bizContent.setReqReserved3("");
bizContent.setReqReserved4("");
bizContent.setfSeqno("");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/account/tradeinfo/meatebillreceive/V1");
request.setBizContent(bizContent);
MybankEnterpriseAccountTradeinfoMeatebillreceiveResponseV1 response =
client.execute(request);
if (response.isSuccess()) {
return R.ok();
} else {
return R.failed();
}
} catch (Exception e) {
e.printStackTrace();
}
return R.ok();
}
private void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName());
......
......@@ -73,8 +73,8 @@ spring:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
......
......@@ -194,6 +194,29 @@ public class SocialTask {
log.info("------------2定时任务推送社保士兵-定时任务结束------------");
}
/**
* @Description: 1定时任务推送税友
* @Author: hgw
* @Date: 2024-12-9 17:00:02
**/
public void doPushFriend() {
log.info("------------1定时任务推送税友-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tsocialfriend/inner/doPushFriend","", Object.class, SecurityConstants.FROM_IN);
log.info("------------1定时任务推送税友-定时任务结束------------");
}
/**
* @Description: 2定时任务获取税友
* @Author: hgw
* @Date: 2024-12-9 16:59:56
**/
public void doGetFriendByRequestId() {
log.info("------------2定时任务获取税友-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tsocialfriend/inner/doGetFriendByRequestId","", Object.class, SecurityConstants.FROM_IN);
log.info("------------2定时任务获取税友-定时任务结束------------");
}
/**
* @Description: 3每日定时任务推送社保士兵审核结果查询
* @Author: hgw
......
......@@ -174,7 +174,8 @@ public class SysUserPermissionController {
@PostMapping("/autoCreateAuth")
public R<String> autoCreateAuth(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
......
......@@ -181,7 +181,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
try {
jsonString = URLDecoder.decode(jsonString, "UTF-8").replace("=", "");
String json = jsonString.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonString = URLDecoder.decode(json, "UTF-8").replace("=", "");
vo.setJsonString(jsonString);
SalaryAccountUtil util1 = new SalaryAccountUtil();
......@@ -1554,7 +1555,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
* @param savList 报账表Vo
* @param orderId
* @param vo
* @Description: 保存并提交
* @Author: huyc
* @Date: 2022/8/16
......
......@@ -554,9 +554,7 @@
</if>
<where>
a.DELETE_FLAG = 0
/*and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)*/
<include refid="tSalaryAccount_where"/>
<if test="deptNos != null and deptNos.size>0">
AND a.DEPT_NO not in
......@@ -877,9 +875,7 @@
left join sys_area ap on ap.id=a.BANK_PROVINCE
left join sys_area ac on ac.id=a.BANK_CITY
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
a.DELETE_FLAG = 0
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
......@@ -1067,9 +1063,7 @@
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
a.DELETE_FLAG = 0
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
......@@ -1529,9 +1523,7 @@
left join sys_area ac on ac.id=a.BANK_CITY
<where>
a.DELETE_FLAG = 0
/*and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)*/
<include refid="where_export"/>
<if test="deptNos != null and deptNos.size>0">
AND a.DEPT_NO not in
......@@ -1564,9 +1556,7 @@
</if>
<where>
a.DELETE_FLAG = 0
/*and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)*/
<include refid="where_export"/>
<if test="deptNos != null and deptNos.size>0">
AND a.DEPT_NO not in
......
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Data
@TableName("sys_config_limit")
@Schema(description = "系统限制配置表")
public class SysConfigLimit {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 限制键
*/
@ExcelAttribute(name = "限制键", isNotEmpty = true, errorInfo = "限制键不能为空", maxLength = 32)
@NotBlank(message = "限制键不能为空")
@Length(max = 32, message = "限制键不能超过32个字符")
@ExcelProperty("限制键")
@Schema(description = "限制键")
private String configKey;
/**
* 限制值
*/
@ExcelAttribute(name = "限制值", isNotEmpty = true, errorInfo = "限制值不能为空")
@NotBlank(message = "限制值不能为空")
@ExcelProperty("限制值")
@Schema(description = "限制值")
private Integer configValue;
/**
* 备注
*/
@ExcelAttribute(name = "备注", maxLength = 255)
@Length(max = 255, message = "备注不能超过255个字符")
@ExcelProperty("备注")
@Schema(description = "备注")
private String remark;
}
......@@ -203,12 +203,81 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 50)
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户" )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码" )
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户" )
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码" )
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 是否配置公章
*/
@ExcelAttribute(name = "是否配置公章" )
@Schema(description ="是否配置公章")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否配置公章")
private String isSign;
/**
* 是否配置公章
*/
@Schema(description ="行政区划代码")
private String areaCode;
/**
* 自动化配置状态 0 启用 1 禁用
*/
@Schema(description ="自动化配置状态")
private String autoStatus;
/**
* 医保单位编号
*/
@ExcelAttribute(name = "医保-单位编号" )
@Schema(description ="医保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-单位编号")
private String customerNoYsd;
/**
* 审核人部门
*/
......@@ -221,4 +290,16 @@ public class SysHouseHoldInfo extends BaseEntity {
@TableField(exist = false)
private String handleUserDeptName;
/**
* 附件Id
*/
@TableField(exist = false)
private String attaId;
/**
* 印章附件
*/
@TableField(exist = false)
private TAttaInfo atta;
}
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_atta_info")
@Tag(name = "附件信息表")
public class TAttaInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 资源名称
*/
@NotBlank(message = "资源名称不能为空")
@Length(max = 50, message = "资源名称不能超过50个字符")
@Schema(description = "资源名称")
private String attaName;
/**
* 资源地址
*/
@NotBlank(message = "资源地址不能为空")
@Length(max = 100, message = "资源地址不能超过100个字符")
@Schema(description = "资源地址")
private String attaSrc;
/**
* 资源大小
*/
@Schema(description = "资源大小")
private Long attaSize;
/**
* 资源类型
*/
@Length(max = 10, message = "资源类型不能超过10个字符")
@Schema(description = "资源类型")
private String attaType;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank(message = "实体id和关系类型共同确定附件所属不能为空")
@Length(max = 32, message = "实体id和关系类型共同确定附件所属不能超过32个字符")
@Schema(description = "实体id和关系类型共同确定附件所属")
private String domainId;
/**
* 地址URL
*/
@Length(max = 100, message = "地址URL不能超过100个字符")
@Schema(description = "地址URL")
@TableField(exist = false)
private String attaUrl;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField(exist = false)
private String handleType;
/**
* 其他分租名称
*/
@TableField(exist = false)
private String groupName;
}
......@@ -597,6 +597,13 @@ public class TPaymentInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPercent;
/**
* 个人公积金费用
*/
......
......@@ -85,7 +85,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String town;
/**
* 社保起始日
* 社保(增员)起始日
*/
@ExcelAttribute(name = "社保起始日", isNotEmpty = true, errorInfo = "社保起始日不能为空", isDate = true)
@NotBlank(message = "社保起始日不能为空")
......@@ -93,7 +93,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema(description = "社保起始日")
private Date socialStartDate;
/**
* 社保截止日
* 社保(增员)截止日
*/
@ExcelAttribute(name = "社保截止日", isNotEmpty = true, errorInfo = "社保截止日不能为空", isDate = true)
@NotBlank(message = "社保截止日不能为空")
......@@ -101,7 +101,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema(description = "社保截止日")
private Date socialEndDate;
/**
* 医疗起始日
* 医疗(增员)起始日
*/
@ExcelAttribute(name = "医疗起始日", isNotEmpty = true, errorInfo = "医疗起始日不能为空", isDate = true)
@NotBlank(message = "医疗起始日不能为空")
......@@ -109,7 +109,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema(description = "医疗起始日")
private Date medicalStartDate;
/**
* 医疗截止日
* 医疗(增员)截止日
*/
@ExcelAttribute(name = "医疗截止日", isNotEmpty = true, errorInfo = "医疗截止日不能为空", isDate = true)
@NotBlank(message = "医疗截止日不能为空")
......@@ -141,4 +141,41 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema(description = "配置类型:0 非基础配置 1基础配置(后面配置都是按他生成的)")
private String type;
/**
* 社保减员起始日期
*/
@ExcelAttribute(name = "社保减员起始日期", isNotEmpty = true, errorInfo = "社保减员起始日期不能为空", isDate = true)
@NotBlank(message = "社保减员起始日期不可为空")
@ExcelProperty("社保减员起始日期")
@Schema(description = "社保减员起始日期")
private Date socialStartDateReduce;
/**
* 医疗减员起始日期
*/
@ExcelAttribute(name = "医疗减员起始日期", isNotEmpty = true, errorInfo = "医疗减员起始日期不能为空", isDate = true)
@NotBlank(message = "医疗减员起始日期不能为空")
@ExcelProperty("医疗减员起始日期")
@Schema(description = "医疗减员起始日期")
private Date medicalStartDateReduce;
/**
* 社保减员截止日期
*/
@ExcelAttribute(name = "社保减员截止日期", isNotEmpty = true, errorInfo = "社保减员截止日期不能为空", isDate = true)
@NotBlank(message = "社保减员截止日期不能为空")
@ExcelProperty("社保减员截止日期")
@Schema(description = "社保减员截止日期")
private Date socialEndDateReduce;
/**
* 医疗减员截止日期
*/
@ExcelAttribute(name = "医疗减员截止日期", isNotEmpty = true, errorInfo = "医疗减员截止日期不能为空", isDate = true)
@NotBlank(message = "医疗减员截止日期不能为空")
@ExcelProperty("医疗减员截止日期")
@Schema(description = "医疗减员截止日期")
private Date medicalEndDateReduce;
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
@Data
@TableName("t_social_freind_set")
@Schema(description = "社保士兵与税友切换表")
public class TSocialFreindSet {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 类型:0社保士兵 1税友
*/
@ExcelAttribute(name = "类型:0社保士兵 1税友", isNotEmpty = true, errorInfo = "类型:0社保士兵 1税友不能为空")
@NotBlank(message = "类型:0社保士兵 1税友不能为空")
@ExcelProperty("类型:0社保士兵 1税友")
@Schema(description = "类型:0社保士兵 1税友")
private Integer type;
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
@Data
@TableName("t_social_friend_back_log")
@Schema(description = "社保士兵返回的数据记录表")
public class TSocialFriendBackLog {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 社保ID
*/
@ExcelAttribute(name = "社保ID", maxLength = 32)
@Length(max = 32, message = "社保ID不能超过32个字符")
@ExcelProperty("社保ID")
@Schema(description = "社保ID")
private String socialId;
/**
* 请求ID
*/
@ExcelAttribute(name = "请求ID", maxLength = 50)
@Length(max = 50, message = "请求ID不能超过50个字符")
@ExcelProperty("请求ID")
@Schema(description = "请求ID")
private String requestId;
@ExcelAttribute(name = "类型")
@ExcelProperty("类型")
@Schema(description = "类型1社保增 2社保减 3医保增 4医保减 5推送的日志")
private Integer type;
/**
* 日志
*/
@ExcelAttribute(name = "日志")
@ExcelProperty("日志")
@Schema(description = "日志")
private String logInfo;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}
......@@ -1045,6 +1045,25 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("医生大社保士兵的任务ID" )
private String ysdAddId;
/**
* 养工失税友的任务ID
*/
@Length(max = 50, message = "养工失税友的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "养工失税友的任务ID", maxLength = 50)
@Schema(description = "养工失税友的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养工失税友的任务ID" )
private String ygsRequestId;
/**
* 医生大税友的任务ID
*/
@Length(max = 50, message = "医生大税友的任务ID 不能超过50个字符" )
@ExcelAttribute(name = "医生大税友的任务ID", maxLength = 50)
@Schema(description = "医生大税友的任务ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医生大税友的任务ID" )
private String ysdRequestId;
// 派单id,社保士兵使用
@TableField(exist = false)
private String dispatchId;
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2024/5/10
* @Description
* @Version 1.0
*/
@Data
public class FriendResult implements Serializable {
// 身份证
private String idCard;
// 状态1-处理中,2-处理成功,3-处理失败,4-待办(提交成功,待网厅状态流转,上海特有)
private String zt;
// 提示或者错误信息 SUCCESS
private String cwxx;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author hgw
* @Description 社保士兵养工失增加模板
* @Date 2024-5-10 21:05:29
**/
@Data
public class SociaFriendYgsAddVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
@ExcelProperty("社保户")
private String socialHouseholdName;
// 户配置的“单位统一信用代码”
private String unitCreditCode;
// "行政区划代码"
private String areaCode;
// "社保-登录账户"
private String socialAccount;
// "社保-登录密码"
private String socialPassword;
// "医保-登录账户"
private String mediclAccount;
// "医保-登录密码"
private String mediclPassword;
// "单位编号"
private String customerNo;
// "单位编号" 医保
private String customerNoYsd;
@ExcelProperty("员工姓名")
private String empName;
@ExcelProperty("员工身份证")
private String empIdcard;
@ExcelProperty("民族")
private String empNational;
@ExcelProperty("手机号码")
private String empMobile;
// yyyy-MM-dd
@ExcelProperty("社保起缴日期")
private String socialStartDate;
// whcd 见字典“受教育程度” 空的默认“大学专科”
@ExcelProperty("学历")
private String educationName;
@ExcelProperty("备案基数")
private String recordBase;
// yyyyMM
@ExcelProperty("社保起缴月")
private String socialStartMonth;
// 用工形式ygxs contractType
// 0 订立以完成一定工作任务为期限的劳动合同 1 订立固定期限劳动合同 2 订立无固定期限劳动合同
private String contractType;
// 工作时间制度 派单表的 工时制 1=标准工作时间制度,2=综合计算工时制度,3=不定时工作时间制度
@ExcelProperty("工时制")
private String workingHours;
// 0 以完成一定工作为期限的劳动合同 1 固定期限劳动合同 2 无固定期限劳动合同
private String contractTypeTwo;
// "合同到期时间" 劳动合同截止日期 yyyy-MM-dd
@ExcelProperty("合同到期时间")
private String contractEnd;
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
@ExcelProperty("中断原因")
private String tbyy;
// 单位提出协商一致21 职工与用人单位协商一致解除劳动合同(18条1款)
// 退休5 第四十四条第二项,劳动者开始依法享受基本养老保险待遇
//死亡16 劳动者死亡,或者被人民法院宣告死亡或者宣告失踪
//个人辞职1 劳动者提前30天书面通知解除或试用期提前3天通知解除合同
//其他20 法律、行政法规规定的其他情形
//合同期满12 劳动合同期满
//单位辞退2 劳动者严重违反用人单位的规章制度
// 其他的默认 个人辞职1 劳动者提前30天书面通知解除或试用期提前3天通知解除合同 2024-12-12 09:19:59 昨晚盛宇沟通的结果
@ExcelProperty("劳动用工备案解除/终止原因")
private String zzyy;
// 企业职工社会保险增员花名册 qyzgshbxzyhmc
private String qyzgshbxzyhmc;
// 企业职工基本医疗保险参保登记表 qyzgshbxzyhmc
private String qyzgjbylbxcbdjb;
private String socialProvince;
private String socialCity;
private String socialTown;
@ExcelProperty("单位医疗金额标志,1有,0无" )
private Integer unitMedicalMoney;
@ExcelProperty("单位生育金额标志,1有,0无" )
private Integer unitBirthMoney;
@ExcelProperty("单位大病救助金额标志,1有,0无" )
private Integer unitBigailmentMoney;
@ExcelProperty("派单类型")
private String type;
}
......@@ -145,4 +145,20 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelProperty("医生大反馈" )
@ExcelIgnore
private String ysdRemark;
/**
* 社保ID
*/
@TableField(exist = false)
@Schema(description ="社保ID")
@ExcelIgnore
private String socialId;
/**
* 税友自动化办理,此标识区分于页面的导出功能,值为1 时 默认取值派单审核通过 且 未办理的派单数据
*/
@ExcelAttribute(name = "税友自动化办理")
@ExcelIgnore
@Schema(description = "税友自动化办理")
private String syFlag;
}
......@@ -84,7 +84,7 @@ public class SocialSoldierYsdAddVo implements Serializable {
private String socialTown;
@ExcelProperty("养老起缴日期")
private String pensionStart;
;
@ExcelProperty("养老基数")
private BigDecimal unitPensionCardinal;
@ExcelProperty("医疗起缴日期")
......
......@@ -475,15 +475,34 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
private BigDecimal providentCardinal;
/**
* 公积金比例
* 单位公积金比例(原‘公积金比例’)
*/
@ExcelAttribute(name = "公积金比例" )
@Schema(description = "公积金比例" )
@ExcelAttribute(name = "单位公积金缴纳比例" )
@Schema(description = "单位公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金比例" )
@ExcelProperty("单位公积金缴纳比例" )
private BigDecimal providentPer;
/**
* 个人公积金缴纳比例
*/
@ExcelAttribute(name = "个人公积金缴纳比例" )
@Schema(description = "个人公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金缴纳比例" )
private BigDecimal personalProvidentPer;
/**
* 公积金单位个人比例是否一致 0 是 1 否
*/
@ExcelAttribute(name = "公积金单位个人比例是否一致" ,isDataId = true,readConverterExp = "0=是,1=否")
@Schema(description = "公积金单位个人比例是否一致" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金单位个人比例是否一致" )
private String perFlag ;
/**
* 委托备注
*/
......
......@@ -295,14 +295,23 @@ public class TDispatchInfoExportVo {
private BigDecimal unitProvidengCardinal;
/**
* 公积金缴纳比例
* 单位公积金缴纳比例(原:公积金缴纳比例)
*/
@ExcelAttribute(name = "公积金缴纳比例" )
@Schema(description = "公积金缴纳比例" )
@ExcelAttribute(name = "单位公积金缴纳比例" )
@Schema(description = "单位公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳比例" )
@ExcelProperty("单位公积金缴纳比例" )
private BigDecimal unitProvidentPer;
/**
* 个人公积金缴纳比例
*/
@ExcelAttribute(name = "个人公积金缴纳比例" )
@Schema(description = "个人公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金缴纳比例" )
private BigDecimal personalProvidentPer;
/**
* 养老基数
*/
......
......@@ -432,6 +432,14 @@ public class TPaymentInfoBatchVo {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPercent;
/**
* 个人公积金缴费
*/
......
......@@ -377,6 +377,13 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPercent;
/**
* 个人公积金费用
*/
......
......@@ -468,6 +468,13 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPercent;
/**
* 个人公积金费用
*/
......
......@@ -359,6 +359,14 @@ public class TPaymentInfoNewVo extends RowIndex implements Serializable {
@ExcelProperty("个人公积金费用")
private BigDecimal personalProvidentSum;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPercent;
/**
* 公积金户
*/
......
......@@ -578,6 +578,15 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "公积金单边比例", converter = BigDecimalConverter.class)
private BigDecimal providentPercent;
/**
* 单位公积金比例-- 兼用多比例 实际使用值 providentPercent
*/
@ExcelAttribute(name = "单位公积金比例", isFloat = true,max = "100.00")
@Schema(description ="单位公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "单位公积金比例", converter = BigDecimalConverter.class)
private BigDecimal unitProvidentPercent;
/**
* 公积金单边金额
*/
......@@ -586,6 +595,15 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "公积金单边金额", converter = BigDecimalConverter.class)
private BigDecimal unitProvidentSum;
/**
* 单位公积金金额--兼容多比例 实际使用值 unitProvidentSum
*/
@ExcelAttribute(name = "单位公积金金额", isFloat = true,max = "999999999.99", min= -999999999)
@Schema(description ="单位公积金金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "单位公积金金额", converter = BigDecimalConverter.class)
private BigDecimal unitProvidentFee;
/**
* 个人公积金基数
*/
......@@ -594,13 +612,23 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "个人公积金基数", converter = BigDecimalConverter.class)
private BigDecimal personalProidentSet;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例", isFloat = true,max = "100.00")
@Schema(description ="个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "个人公积金比例", converter = BigDecimalConverter.class)
private BigDecimal personalProvidentPercent;
/**
* 个人公积金费用
*/
@ExcelAttribute(name = "个人公积金费用")
@Schema(description ="个人公积金费用")
@ExcelAttribute(name = "个人公积金金额")
@Schema(description ="个人公积金金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "个人公积金费用", converter = BigDecimalConverter.class)
@ExcelProperty(value = "个人公积金金额", converter = BigDecimalConverter.class)
private BigDecimal personalProvidentSum;
/**
* 创建者
......
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 社保户批量导出
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public class TSocialHouseholdExportVo implements Serializable {
@ExcelAttribute(name = "账户性质" )
@Schema(description = "账户性质")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("账户性质")
private String type;
/**
* 员工姓名
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
@Schema(description = "户名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户名")
private String name;
/**
* 缴纳地所在省
*/
@Length(max = 50, message = "缴纳地所在省不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在省", maxLength = 50,isNotEmpty = true, isArea = true, parentField = "")
@Schema(description = "缴纳地所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在省")
private String province;
/**
* 缴纳地所在市
*/
@Length(max = 50, message = "缴纳地所在市不能超过50个字符")
@ExcelAttribute(name = "缴纳地所在市", maxLength = 50,isNotEmpty = true, isArea = true, parentField = "province")
@Schema(description = "缴纳地所在市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在市")
private String city;
/**
* 缴纳地所在县
*/
@Length(max = 50, message = "缴纳地所在县不能超过50个字符")
@ExcelAttribute(name = "缴纳地所在县", maxLength = 50, isArea = true, parentField = "city")
@Schema(description = "缴纳地所在县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在县")
private String town;
/**
* 所属机构
*/
@ExcelAttribute(name = "所属机构", maxLength = 50,isNotEmpty = true)
@Schema(description ="所属机构")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("所属机构")
private String organName;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人", maxLength = 50,isNotEmpty = true )
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人", maxLength = 50,isNotEmpty = true )
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 50,isNotEmpty = true )
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "户类型", maxLength = 3,isNotEmpty = true)
@Schema(description ="户类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号" )
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码" )
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 医保单位编号
*/
@ExcelAttribute(name = "医保-单位编号", maxLength = 20 )
@Schema(description ="医保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-单位编号")
private String customerNoYsd;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户", maxLength = 50 )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码", maxLength = 50 )
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户", maxLength = 50 )
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码", maxLength = 50 )
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
@ExcelAttribute(name = "是否配置公章" )
@Schema(description ="是否配置公章")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否配置公章")
private String isSign;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理" )
@Schema(description ="是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
private String autoStatus;
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
@Schema(description = "户名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户名")
private String name;
/**
* 缴纳地所在省
*/
@Length(max = 32, message = "缴纳地所在省不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在省", maxLength = 32,isNotEmpty = true, isArea = true, parentField = "")
@Schema(description = "缴纳地所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在省")
private String province;
/**
* 缴纳地所在市
*/
@Length(max = 32, message = "缴纳地所在市不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在市", maxLength = 32,isNotEmpty = true, isArea = true, parentField = "province")
@Schema(description = "缴纳地所在市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在市")
private String city;
/**
* 缴纳地所在县
*/
@Length(max = 32, message = "缴纳地所在县不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在县", maxLength = 32, isArea = true, parentField = "city")
@Schema(description = "缴纳地所在县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在县")
private String town;
/**
* 所属机构
*/
@ExcelAttribute(name = "所属机构", maxLength = 50,isNotEmpty = true)
@Schema(description ="所属机构")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("所属机构")
private String organName;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人", maxLength = 50,isNotEmpty = true )
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人", maxLength = 50,isNotEmpty = true )
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 20,isNotEmpty = true,isInteger = true )
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "户类型", maxLength = 3,isNotEmpty = true)
@Schema(description ="户类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号", maxLength = 20 )
@Length(max = 20, message = "单位编号不能超过20个字符")
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码", maxLength = 50 )
@Length(max = 50, message = "单位统一信用代码不能超过50个字符")
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 医保单位编号
*/
@ExcelAttribute(name = "医保-单位编号", maxLength = 20 )
@Length(max = 20, message = "医保-单位编号不能超过20个字符")
@Schema(description ="医保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-单位编号")
private String customerNoYsd;
/**
* 社保-登录账户
*/
@Length(max = 50, message = "社保-登录账户不能超过50个字符")
@ExcelAttribute(name = "社保-登录账户", maxLength = 50 )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码", maxLength = 50 )
@Length(max = 50, message = "社保-登录密码不能超过50个字符")
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户", maxLength = 50 )
@Length(max = 50, message = "医保-登录账户不能超过50个字符")
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码", maxLength = 50 )
@Length(max = 50, message = "医保-登录密码不能超过50个字符")
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理", maxLength = 1,isNotEmpty = true )
@Schema(description ="是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
private String autoStatus;
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
@Schema(description = "户名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户名")
private String name;
/**
* 缴纳地所在省
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在省", maxLength = 32, isArea = true, parentField = "")
@Schema(description = "缴纳地所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在省")
private String province;
/**
* 缴纳地所在市
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在市", maxLength = 32, isArea = true, parentField = "province")
@Schema(description = "缴纳地所在市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在市")
private String city;
/**
* 缴纳地所在县
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在县", maxLength = 32, isArea = true, parentField = "city")
@Schema(description = "缴纳地所在县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在县")
private String town;
/**
* 所属机构
*/
@ExcelAttribute(name = "所属机构", maxLength = 50)
@Schema(description ="所属机构")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("所属机构")
private String organName;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人", maxLength = 50)
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人", maxLength = 50)
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 20,isInteger = true)
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "户类型", maxLength = 3)
@Schema(description ="户类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号", maxLength = 20 )
@Length(max = 20, message = "单位编号不能超过20个字符")
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码", maxLength = 50 )
@Length(max = 50, message = "单位统一信用代码不能超过50个字符")
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 医保单位编号
*/
@ExcelAttribute(name = "医保-单位编号", maxLength = 20 )
@Length(max = 20, message = "医保-单位编号不能超过20个字符")
@Schema(description ="医保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-单位编号")
private String customerNoYsd;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户", maxLength = 50 )
@Length(max = 50, message = "社保-登录账户不能超过50个字符")
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码", maxLength = 50 )
@Length(max = 50, message = "社保-登录密码不能超过50个字符")
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户", maxLength = 50 )
@Length(max = 50, message = "医保-登录账户不能超过50个字符")
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码", maxLength = 50 )
@Length(max = 50, message = "医保-登录密码不能超过50个字符")
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理", maxLength = 1,isNotEmpty = true)
@Schema(description ="是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
private String autoStatus;
}
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
</parent>
<artifactId>yifu-social-biz</artifactId>
<packaging>jar</packaging>
<artifactId>yifu-social-biz</artifactId>
<packaging>jar</packaging>
<description>yifu-social 业务模块</description>
<description>yifu-social 业务模块</description>
<dependencies>
<dependencies>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
......@@ -67,18 +67,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
......@@ -98,7 +98,15 @@
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<!-- excel to image -->
<dependency>
<groupId>spire.xls</groupId>
<artifactId>spire.xls</artifactId>
<version>5.3.0</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
......
package com.yifu.cloud.plus.v1.yifu.social.config;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Base64;
import java.util.Map;
/**
* @author hgw2
* @description 税友签名接口
* @date 2024/12/9
*/
public class SocialFriendSign {
public static String qianMing(Map<String, String> treeMap) throws SignatureException {
// 1. 将以上 key=value 对的 value 进行合并,生成一下字符串 mergeStr
//System.out.println("header内的信息:"+treeMap.toString())
StringBuilder mergeStr = new StringBuilder();
for (Map.Entry<String, String> stringStringEntry : treeMap.entrySet()) {
mergeStr.append(stringStringEntry.getValue());
}
//System.out.println("Key-Value 合并: " + mergeStr)
// 2. 将生成的 mergeStr 进行 Url 编码
String encodedStr = null;
try {
encodedStr = URLEncoder.encode(mergeStr.toString(), "UTF-8");
} catch (UnsupportedEncodingException e) {
// URL 编码失败
throw new SignatureException("【税友】URL 编码失败");
}
//System.out.println("encodeURL 编码:" + encodedStr)
// 3.利用 HmacSHA256 算法对 signStr 进行哈希运算生成消息摘要,摘要结果以 Base64 结果形式返回,signStr 即为请求参数中的 signature 字段
String signatureResult = "";
try {
Mac mac = Mac.getInstance("HmacSHA256");
SecretKeySpec signingKey = new SecretKeySpec(treeMap.get("appSecret").getBytes(), "HmacSHA256");
mac.init(signingKey);
byte[] signData = mac.doFinal(encodedStr.getBytes());
byte[] resultBytes = Base64.getEncoder().encode(signData);
signatureResult = new String(resultBytes, StandardCharsets.UTF_8);
} catch (NoSuchAlgorithmException e) {
throw new SignatureException("【税友】平台不支持 HmacSHA 摘要方式");
} catch (InvalidKeyException e) {
throw new SignatureException("【税友】指定的访问密钥无效");
}
//ystem.out.println("加密结果: " + signatureResult)
return signatureResult;
}
private SocialFriendSign() {
throw new IllegalStateException("SocialFriendSign class");
}
}
package com.yifu.cloud.plus.v1.yifu.social.constants;
/**
* @author huych
* @description 户配置相关
* @date 2024/12/9
*/
public class HouseConfigConstants {
public static final String HOUSE_TYPE_ONE = "自有户";
public static final String HOUSE_TYPE_TWO = "独立户";
public static final String ERROR_SAME_HOUSE = "模板中已存在相同户名的数据";
public static final String ERROR_NOT_EXIT = "未找到对应账户性质、户名的配置";
public static final String ERROR_IS_EXIT = "对应账户性质、户名的配置已存在";
public static final String ERROR_TEMPLATE_ONE = "户类型只能是【自有户】或者【独立户】";
public static final String ERROR_TEMPLATE_TWO = "是否自动办理,选择是时,社保和医保信息必须填写其中一个";
public static final String ERROR_TEMPLATE_THREE = "是否自动办理只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_FOUR = "未找到对应的审核人或办理人的人员信息";
public static final String ERROR_TEMPLATE_FIVE = "社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写";
public static final String ERROR_TEMPLATE_SIX = "省市的信息需要填写完善!";
public static final String SUCESS = "成功";
public static final String ERROR_TEMPLATE_SEVEN = "未找到模板中填写的所属机构";
public static final String ERROR_TEMPLATE_EIGHT = "手机号格式校验失败";
}
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAttaVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* @author fang
* 文件上传接口
*/
@RestController
@RequestMapping("/fileUpload")
@Tag(name = "文件上传接口")
@Slf4j
public class FileUploadController {
@Autowired
private OSSUtil ossUtil;
@Autowired
private TAttaInfoService tAttaInfoService;
@Autowired
private FileUploadService fileUploadService;
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", required = false, dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "type", value = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招标信息7业务评估8电子档案)", required = true, dataType = "int", paramType = "form"),
@ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系,用于编辑)", required = false, paramType = "form")
})*/
@PostMapping(value = "/ossUploadFile")
public R<T> uploadImg(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domain,CommonConstants.ZERO_STRING);
}
/**
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<T> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domainId,CommonConstants.ONE_STRING);
}
/**
* @Author fxj
* @Description
* @Date 13:51 2022/6/17
* @Param
* @return
**/
@Operation(description = "附件删除")
@SysLog("附件删除")
@DeleteMapping("/ossFileDelete/{id}")
public R<Boolean> ossFileDelete(@PathVariable String id) {
try {
TAttaInfo attaInfo = tAttaInfoService.getById(id);
if (null == attaInfo) {
return R.failed("无对应附件信息");
}
if (tAttaInfoService.removeById(id)) {
ossUtil.deleteObject(null, attaInfo.getAttaSrc());
return R.ok(null,"删除成功!");
}
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return R.failed("附件删除异常!");
}
return R.ok(null,"删除失败!");
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation(description = "附件预览下载地址 type:关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业")
@GetMapping("/ossFileUrl/{id}")
public R<List<TAttaInfo>> ossFileUrl(@PathVariable String id) {
List<TAttaInfo> attas = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,id));
if (Common.isEmpty(attas)) {
return new R<>(attas);
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString().replace("http","https"));
}
return new R<>(attas);
}
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation(summary = "获取薪资原表附件--EKP调用接口", description = "获取薪资原表附件--EKP调用接口")
@SysLog("获取薪资原表附件--EKP调用接口")
@GetMapping("/getAttaListBySalaryId")
public R<List<SalaryAttaVo>> getAttaListBySalaryId(@RequestParam String salaryId) {
List<SalaryAttaVo> voList = new ArrayList<>();
List<TAttaInfo> attaList = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getRelationType,11)
.eq(TAttaInfo::getDomainId,salaryId));
if (attaList != null && !attaList.isEmpty()) {
SalaryAttaVo vo;
URL url;
for (TAttaInfo a : attaList){
url = ossUtil.getObjectUrl(null, a.getAttaSrc());
vo = new SalaryAttaVo();
vo.setAttaName(a.getAttaName());
vo.setAttaUrl(url.toString().replace("http","https"));
voList.add(vo);
}
}
return R.ok(voList);
}
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
......@@ -30,9 +31,12 @@ import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -93,7 +97,7 @@ public class SysHouseHoldInfoController {
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_syshouseholdinfo_get')")
@GetMapping("/{id}" )
public R<SysHouseHoldInfo> getById(@PathVariable("id" ) String id) {
return R.ok(sysHouseHoldInfoService.getById(id));
return sysHouseHoldInfoService.getByIdAtta(id);
}
/**
......@@ -210,4 +214,47 @@ public class SysHouseHoldInfoController {
return R.ok(1);
}
/**
* 批量新增社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation(description = "批量新增社保户配置数据 hasPermission('syshouseholdinfo_batch_add')")
@SysLog("批量新增社保户配置数据")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_batch_add')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file){
return sysHouseHoldInfoService.importListAdd(file.getInputStream());
}
/**
* 批量更新社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation(description = "批量更新社保户配置数据 hasPermission('syshouseholdinfo_batch_update')")
@SysLog("批量更新社保户配置数据")
@PostMapping("/importListUpdate")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_batch_add')")
public R<List<ErrorMessage>> importListUpdate(@RequestBody MultipartFile file){
return sysHouseHoldInfoService.importListUpdate(file.getInputStream());
}
/**
* 导出社保户配置数据
*
* @author huyc
* @date 2024-12-5 11:32:08
**/
@Operation(description = "导出社保户配置数据")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_export')")
public void export(HttpServletResponse response, @RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
sysHouseHoldInfoService.listExport(response,sysHouseHoldInfo);
}
}
......@@ -15,7 +15,6 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;/*
* Author: lengleng (wangiegie@gmail.com)
*/
import cn.hutool.core.date.LocalDateTimeUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -53,8 +52,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.List;
......@@ -298,7 +295,42 @@ public class TPaymentInfoController {
}
try {
if (Common.isNotNull(requestId)) {
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream());
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream(),0);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 导入公积金-多比例
*
* @author huyc
* @date 2022-07-27
**/
@SneakyThrows
@Operation(description = "导入公积金-多比例 hasPermission('social_tpaymentinfo_batchImport')")
@SysLog("导入公积金-多比例")
@PostMapping("/batchImportPaymentFundInfoNew")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorDetailVO>> importListFundNew(@RequestBody MultipartFile file) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_FUND_IMPORT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream(),1);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......@@ -307,7 +339,6 @@ public class TPaymentInfoController {
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 缴费库 批量导出
*
......
......@@ -253,7 +253,8 @@ public class TPreDispatchInfoController {
if (Common.isNotNull(requestId)) {
ExcelUtil<TPreDispatchInfo> util1 = null;
try {
jsonString = URLDecoder.decode(jsonString, CommonConstants.UTF8).replace("=", "");
String json = jsonString.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonString = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
util1 = new ExcelUtil<>(TPreDispatchInfo.class);
util1.getJsonStringToList(jsonString, null);
List<TPreDispatchInfo> listInfo = util1.getEntityList();
......@@ -303,7 +304,8 @@ public class TPreDispatchInfoController {
}
ExcelUtil<TPreDispatchReduceVo> util1 = null;
try {
jsonString = URLDecoder.decode(jsonString, CommonConstants.UTF8).replace("=", "");
String json = jsonString.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonString = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
util1 = new ExcelUtil<>(TPreDispatchReduceVo.class);
util1.getJsonStringToList(jsonString, null);
List<TPreDispatchReduceVo> listInfo = util1.getEntityList();
......@@ -348,7 +350,8 @@ public class TPreDispatchInfoController {
R<List<SysDict>> res = null;
Map<String, String> dicMap = new HashMap<>();
try {
jsonString = URLDecoder.decode(jsonString, CommonConstants.UTF8).replace("=", "");
String json = jsonString.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonString = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
util1 = new ExcelUtil<>(TPreDispatchUpdateVo.class);
Map<String, String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS
......
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.alibaba.fastjson.JSONObject;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendPushService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 税友
*
* @author hgw
* @date 2024-12-6 15:46:04
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tsocialfriend")
@Tag(name = "税友")
public class TSocialFriendController {
private final TSocialFriendService tSocialFriendService;
private final TSocialFriendPushService tSocialFriendPushService;
@Operation(description = "1定时任务推送税友")
@PostMapping("/inner/doPushFriend")
@SysLog("1定时任务推送税友")
@Inner
public R<String> doPushFriendTest() {
return tSocialFriendPushService.pushFriend(null);
}
@Operation(description = "2定时任务获取税友")
@PostMapping("/inner/doGetFriendByRequestId")
@SysLog("2定时任务获取税友")
@Inner
public R<String> doGetFriendByRequestId() {
return tSocialFriendService.getInfoByRequestId();
}
}
package com.yifu.cloud.plus.v1.yifu.social.mapper;/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.SysConfigLimit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Mapper
public interface SysConfigLimitMapper extends BaseMapper<SysConfigLimit> {
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
Integer getSysConfigLimitByKey(@Param("configKey") String configKey);
}
......@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdExportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社保户公积金户数据
*
......@@ -45,4 +48,18 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
* @return
*/
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
/**
* 查询导出的数量
* @param sysHouseHoldInfo
* @return
*/
long selectExportCount(@Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
/**
* 查询导出的集合
* @param sysHouseHoldInfo
* @return
*/
List<TSocialHouseholdExportVo> selectExportList(@Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
}
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Mapper
public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, @Param("tAttaInfo") TAttaInfo tAttaInfo);
/**
* @param tAttaInfo
* @Description: 获取list
* @Author: hgw
* @Date: 2021/5/28 16:02
* @return: java.util.List<com.yifu.cloud.v1.crm.api.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoList(@Param("tAttaInfo") TAttaInfo tAttaInfo);
List<TAttaInfo> getTAttaInfoListByDoMainId(@Param("domainId") String domainId);
List<TAttaInfo> getKeenAtta(@Param("dayStart")LocalDateTime dayStart, @Param("values")Collection<String> values);
int updateDomainId(@Param("domainId")String domainId, @Param("ids")List<String> ids);
List<TAttaInfo> getAttaByApplyId(@Param("applyId")String applyId);
void deleteByDomainId(@Param("domainId") String domainId);
void deleteByDomainIdAndType(@Param("domainId") String domainId, @Param("relationType") String relationType);
// 删除学历与职业资格之外的附件
void deleteByDomainIdAndOther(@Param("domainId") String domainId);
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
@Mapper
public interface TSocialFreindSetMapper extends BaseMapper<TSocialFreindSet> {
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
@Mapper
public interface TSocialFriendBackLogMapper extends BaseMapper<TSocialFriendBackLog> {
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 税友Mapper
*
* @author hgw
* @date 2024-5-13 11:54:57
*/
@Mapper
public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
/**
* 社保士兵养工失增加模板
*
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SociaFriendYgsAddVo> getSocialSoldierYgsAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失减少模板
*
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SociaFriendYgsAddVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵医生大增加模板
*
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SociaFriendYgsAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵医生大减少模板
*
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SociaFriendYgsAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
}
......@@ -50,6 +50,9 @@ public interface TSocialInfoMapper extends BaseMapper<TSocialInfo> {
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
List<TSocialInfo> getSocialFriendYgsAll();
List<TSocialInfo> getSocialFriendYsdAll();
/**
* @param
* @Description: 获取所有需要社保局审核的社保
......
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* 文件上传
*
* @author pwang
* @date 2022-07-27 16:16:07
*/
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<T> uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType);
}
......@@ -21,9 +21,14 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 社保户公积金户数据
*
......@@ -45,7 +50,20 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
*/
R<Boolean> saveInfo (SysHouseHoldInfo sysHouseHoldInfo);
/**
* 户新增
* @param id
* @return R
*/
R<SysHouseHoldInfo> getByIdAtta (String id);
R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo);
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
R<List<ErrorMessage>> importListAdd(InputStream inputStream);
R<List<ErrorMessage>> importListUpdate(InputStream inputStream);
void listExport(HttpServletResponse response, SysHouseHoldInfo sysHouseHoldInfo);
}
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
public interface TAttaInfoService extends IService<TAttaInfo> {
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, TAttaInfo tAttaInfo);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
List<TAttaInfo> getTAttaInfoList(TAttaInfo tAttaInfo);
/**
* @param domainId 关联id
* @Description: 根据domainId获取附件
* @Author: hgw
* @Date: 2024/6/17 18:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId);
TAttaInfo add(TAttaInfo attaInfo);
void update(List<TAttaInfo> attaList, String domainId, String relationType);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
Boolean batchOssFileDelete(List<TAttaInfo> delAttaList);
List<TAttaInfo> getKeenAtta(LocalDateTime dayStart, Collection<String> values);
Boolean updateDomainId(String domainId, List<String> ids);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R<List<TAttaInfo>> getAttaByApplyId(String applyId);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void deleteByDomainId(String domainId);
void deleteByDomainIdAndOther(String domainId);
void deleteByDomainIdAndType(String domainId, int relationType);
}
......@@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
......@@ -44,12 +45,12 @@ import java.util.concurrent.ConcurrentHashMap;
* @date 2022-07-15 11:38:05
*/
public interface TDispatchInfoService extends IService<TDispatchInfo> {
/**
* 派单信息记录表简单分页查询
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
/**
* 派单信息记录表简单分页查询
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
IPage<TDispatchInfoPageVo> getTDispatchInfoPageAudit(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
......@@ -57,11 +58,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> importSocialHandler(InputStream inputStream,String mId, boolean isAutoHandle);
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
void listAuditExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
@Transactional
@ShardingTransactionType(TransactionType.BASE)
......@@ -79,7 +80,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo getSocialAndFundInfoById(String id);
List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, int flag, String auditStatus, String auditRemark, String remark);
List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, int flag, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyAudit(List<String> ids, String auditStatus, String auditRemark, String remark);
......@@ -166,4 +167,5 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr);
R<URL> doExportRoster(String socialId, String type,String unitCreditCode);
}
......@@ -85,9 +85,10 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
/**
* 批量导入公积金
* @param inputStream
* @param type 0 单边比例 1 多比例
* @return
*/
R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream);
R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream,int type);
/**
* 导出缴费库
......
......@@ -65,4 +65,6 @@ public interface TSocialDeadlineInfoService extends IService<TSocialDeadlineInfo
**/
Map<String, TSocialDeadlineInfo> getSocialSet();
Map<String, TSocialDeadlineInfo> getSocialSetByAreaId();
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindSet;
/**
* 社保士兵与税友切换表
*
* @author hgw
* @date 2024-12-12 09:40:56
*/
public interface TSocialFreindSetService extends IService<TSocialFreindSet> {
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
/**
* 社保士兵返回的数据记录表
*
* @author hgw
* @date 2024-12-12 09:40:55
*/
public interface TSocialFriendBackLogService extends IService<TSocialFriendBackLog> {
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import java.util.List;
/**
* 税友-推送
*
* @author hgw
* @date 2024-12-6 15:43:28
*/
public interface TSocialFriendPushService extends IService<TSocialInfo> {
/**
* @param dispatchIdList
* @Description: 根据派单id,获取要派增派减的社保、医保数据,生成文件,推送到社保士兵
* @Author: hgw
* @Date: 2024/5/10 17:52
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> pushFriend(List<String> dispatchIdList);
R<String> doExportRoster(String socialId, String type, String unitCreditCode);
}
/*
* Copyright (c) 2018-2025, lengleng 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 yifu4cloud.com 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: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
/**
* 社保士兵
*
* @author hgw
* @date 2024-5-8 14:55:24
*/
public interface TSocialFriendService extends IService<TSocialInfo> {
/**
* @Description: 查看税友反馈情况
* @Author: hgw
* @Date: 2024/5/11 14:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getInfoByRequestId();
}
......@@ -66,6 +66,9 @@ public interface TSocialInfoService extends IService<TSocialInfo> {
**/
List<TSocialInfo> getSocialSoldierYgsAll();
List<TSocialInfo> getSocialSoldierYsdAll();
List<TSocialInfo> getSocialFriendYgsAll();
List<TSocialInfo> getSocialFriendYsdAll();
/**
* @Description: 获取所有需要审核结果的社保
* @Author: hgw
......
......@@ -59,6 +59,11 @@ public interface TSocialSoldierLogService extends IService<TSocialSoldierLog> {
// 医保提交日志
TSocialSoldierLog getYsdSoldierLog(SocialSoldierYsdAddVo vo, String type, String remark);
// 社保提交日志-税友
TSocialSoldierLog getFriendLog(SociaFriendYgsAddVo vo, String type, String dispatchItem, String remark);
// 拉取提交结果日志 dispatchItem 社保、医保
TSocialSoldierLog getSocialFriendLog(TSocialInfo social, String type, String dispatchItem, String remark);
// 审核社保提交日志
TSocialSoldierLog getYgsSoldierAuditLog(SocialSoldierYgsAuditVo vo, String type, String remark);
// 审核医保提交日志
......
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysConfigLimitMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
@Service
@RequiredArgsConstructor
@Slf4j
public class FileUploadServiceImpl implements FileUploadService {
private final OSSUtil ossUtil;
private final TAttaInfoService tAttaInfoService;
private AtomicInteger atomicInteger = new AtomicInteger(0);
//初始化附件上传队列上限值
private int maxLimit = 1;
private final SysConfigLimitMapper configLimitMapper;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型:" + fileName);
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domainId);
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("2", 1L, "", "预入职扫码",
"预入职扫码", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
attaInfo.setCreateBy(user.getId());
attaInfo.setCreateName(user.getNickname());
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("上传异常:" + e.getMessage());
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
attaInfo.setAttaUrl(String.valueOf(url));
return R.ok(attaInfo);
} else {
return R.failed("fail:上传异常");
}
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型!");
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
FileVo fileVo;
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("fail:" + e.getMessage());
}
//有实体id则插入关系,用于编辑
if (Common.isNotNull(domain)) {
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
} else {
return R.failed("fail:上传失败");
}
}
private R<FileVo> uploadImg2(InputStream fileIn, String filePath, Integer type, String domain, String fileName) throws IOException {
if (null == fileIn) {
return R.failed("文件上传异常,请重新上传!");
}
if (Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = System.currentTimeMillis() + fileName;
boolean flag = ossUtil.uploadFileByStream(fileIn, key, null);
FileVo fileVo;
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, 0);
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("fail:" + e.getMessage());
}
//有实体id则插入关系,用于编辑
if (Common.isNotNull(domain)) {
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
} else {
return R.failed("fail:上传失败");
}
}
/**
* 对象初始化
*
* @param fileName
* @param key
* @param fileSize
* @return
*/
private TAttaInfo initUnitAttaForInsert(String fileName, String key, long fileSize) {
TAttaInfo unitAtta = new TAttaInfo();
char slash = '/';
char point = '.';
if (fileName.lastIndexOf(slash) >= 0) {
unitAtta.setAttaName(fileName.substring(fileName.lastIndexOf(slash)));
} else {
unitAtta.setAttaName(fileName);
}
unitAtta.setAttaSize(fileSize);
unitAtta.setAttaSrc(key);
if (key.lastIndexOf(point) >= 0) {
unitAtta.setAttaType(key.substring(key.lastIndexOf(point)));
}
unitAtta.setCreateTime(LocalDateTime.now());
return unitAtta;
}
/**
* @return
* @Author fxj
* @Description 整合接口
* @Date 15:24 2024/9/24
* @Param
**/
@Override
public R uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
return getR(file, filePath, type, domain, uploadType);
}
public R getR(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
maxLimit = configLimitMapper.getSysConfigLimitByKey("UPLOAD_MAX_LIMIT");
if (atomicInteger.incrementAndGet() <= maxLimit) {
try {
if (CommonConstants.ZERO_STRING.equals(uploadType)) {
return uploadImg(file, filePath, type, domain);
} else if (CommonConstants.ONE_STRING.equals(uploadType)) {
return uploadFileReturnAtta(file, filePath, type, domain);
}
} catch (Exception e) {
log.error("附件上传异常:", e);
} finally {
atomicInteger.decrementAndGet();
}
} else {
atomicInteger.decrementAndGet();
log.error("超出阈值:" + ResultConstants.FILE_UPLOADING_DATA);
return R.failed(ResultConstants.FILE_UPLOADING_DATA);
}
return null;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Service
public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo> implements TAttaInfoService {
@Autowired
private OSSUtil ossUtil;
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
@Override
public IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, TAttaInfo tAttaInfo) {
return baseMapper.getTAttaInfoPage(page, tAttaInfo);
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public List<TAttaInfo> getTAttaInfoList(TAttaInfo tAttaInfo) {
return baseMapper.getTAttaInfoList(tAttaInfo);
}
@Override
public List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId) {
return baseMapper.getTAttaInfoListByDoMainId(domainId);
}
@Override
public TAttaInfo add(TAttaInfo attaInfo) {
this.save(attaInfo);
return attaInfo;
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public void update(List<TAttaInfo> attaInfoList, String domainId, String relationType) {
if (attaInfoList != null) {
for (TAttaInfo attaInfo : attaInfoList) {
attaInfo.setDomainId(domainId);
attaInfo.setRelationType(relationType);
this.updateById(attaInfo);
}
}
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public Boolean batchOssFileDelete(List<TAttaInfo> delAttaList) {
try {
for (TAttaInfo delAtta : delAttaList) {
if (this.removeById(delAtta.getId())) {
ossUtil.deleteObject(null, delAtta.getAttaSrc());
}
}
return true;
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return false;
}
}
@Override
public List<TAttaInfo> getKeenAtta(LocalDateTime dayStart, Collection<String> values) {
return baseMapper.getKeenAtta(dayStart,values);
}
@Override
public Boolean updateDomainId(String domainId, List<String> ids){
if (Common.isEmpty(domainId) || !Common.isNotEmpty(ids)){
return false;
}
return baseMapper.updateDomainId(domainId,ids) > 0;
}
@Override
public R<List<TAttaInfo>> getAttaByApplyId(String applyId) {
List<TAttaInfo> list = baseMapper.getAttaByApplyId(applyId);
if (Common.isNotNull(list)) {
URL url;
for (TAttaInfo atta:list) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString());
}
return R.ok(list);
}else{
return R.failed("没有附件");
}
}
@Override
public void deleteByDomainId(String domainId) {
baseMapper.deleteByDomainId(domainId);
}
@Override
public void deleteByDomainIdAndOther(String domainId) {
baseMapper.deleteByDomainIdAndOther(domainId);
}
@Override
public void deleteByDomainIdAndType(String domainId, int relationType) {
// 学历
if (relationType == 0) {
baseMapper.deleteByDomainIdAndType(domainId, "0");
baseMapper.deleteByDomainIdAndType(domainId, "26");
} else if (relationType == 1) {
// 执业资格证书
baseMapper.deleteByDomainIdAndType(domainId, "2");
} else if (relationType == 2) {
// 其他附件
baseMapper.deleteByDomainIdAndType(domainId, "27");
}
}
}
......@@ -1274,11 +1274,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
if (CommonConstants.ONE_STRING.equals(social.getCollectType())
&& CommonConstants.ONE_STRING.equals(social.getValueType())) {
if (social.getUnitBigailmentCardinal().compareTo(socialSet.getLowerBig()) < CommonConstants.ZERO_INT) {
if (BigDecimalUtils.isNullToZero(social.getUnitBigailmentCardinal()).compareTo(socialSet.getLowerBig()) < CommonConstants.ZERO_INT) {
//按年收取大病方式按定值
social.setPersonalBigailmentCardinal(socialSet.getLowerBig());
social.setUnitBigailmentCardinal(socialSet.getLowerBig());
} else if (social.getUnitBigailmentCardinal().compareTo(socialSet.getUpBig()) > CommonConstants.ZERO_INT) {
} else if (BigDecimalUtils.isNullToZero(social.getUnitBigailmentCardinal()).compareTo(socialSet.getUpBig()) > CommonConstants.ZERO_INT) {
social.setPersonalBigailmentCardinal(socialSet.getUpBig());
social.setUnitBigailmentCardinal(socialSet.getUpBig());
}
......
......@@ -2052,7 +2052,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
tProvidentFund = null;
}
//计算公积金合计,个人金额和单位金额一致
infoVo.setProvidentSum(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum(), infoVo.getUnitProvidentSum()));
infoVo.setProvidentSum(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum(), infoVo.getPersonalProvidentSum()));
// 判重
if (paymentInfoMap.size() > CommonConstants.ZERO_INT) {
paymentInfo = (TPaymentInfo) paymentInfoMap.get(infoVo.getProvidentPayAddr()
......@@ -2180,8 +2180,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitProvidentSet(null == infoVo.getUnitProvidentSet() ? BigDecimal.ZERO : infoVo.getUnitProvidentSet());
paymentInfo.setPersonalProidentSet(null == infoVo.getUnitProvidentSet() ? BigDecimal.ZERO : infoVo.getUnitProvidentSet());
paymentInfo.setProvidentPercent(null == infoVo.getProvidentPercent() ? BigDecimal.ZERO : infoVo.getProvidentPercent());
//个人单边比例 fxj 2024-12-06 v1.7.3
paymentInfo.setPersonalProvidentPercent(null == infoVo.getPersonalProvidentPercent() ? BigDecimal.ZERO : infoVo.getPersonalProvidentPercent());
paymentInfo.setProvidentNo(infoVo.getProvidentNo());
paymentInfo.setPersonalProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
//个人单表金额 fxj 2024-12-06 v1.7.3
paymentInfo.setPersonalProvidentSum(null == infoVo.getPersonalProvidentSum() ? BigDecimal.ZERO : infoVo.getPersonalProvidentSum());
paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum());
paymentInfo.setSumAll(paymentInfo.getProvidentSum());
......@@ -2211,7 +2214,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream) {
public R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream, int type) {
List<ErrorDetailVO> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
//批量插入的集合
......@@ -2258,6 +2261,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(new ErrorDetailVO(errorMessage.getLineNum(), errorMessage.getMessage()));
} else {
//直接兼容多比例 fxj 2024-12-06 v1.7.3 type=1 为多比例
if (type == CommonConstants.ZERO_INT){
//非多比例时 直接赋值个人公积金比例和金额 以便后面统一处理
data.setPersonalProvidentPercent(null==data.getProvidentPercent()? BigDecimal.ZERO:data.getProvidentPercent());
data.setPersonalProvidentSum(null==data.getUnitProvidentSum()? BigDecimal.ZERO:data.getUnitProvidentSum());
}else {
// 多比例时 单位公积金比例 和金额 用冗余字段赋值
data.setProvidentPercent(null==data.getUnitProvidentPercent()? BigDecimal.ZERO:data.getUnitProvidentPercent());
data.setUnitProvidentSum(null==data.getUnitProvidentFee()? BigDecimal.ZERO:data.getUnitProvidentFee());
data.setPersonalProidentSet(null==data.getUnitProvidentSet()? BigDecimal.ZERO:data.getUnitProvidentSet());
}
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
......
......@@ -307,12 +307,30 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
if (Common.isNotNull(save.getSocialEndDate())) {
save.setSocialEndDate(this.getNewDateByOldDate(save.getSocialEndDate()));
}
//2024-12-09 fxj v1.7.3
if (Common.isNotNull(save.getSocialStartDateReduce())){
save.setSocialStartDateReduce(this.getNewDateByOldDate(save.getSocialStartDateReduce()));
}
if (Common.isNotNull(save.getSocialEndDateReduce())){
save.setSocialEndDateReduce(this.getNewDateByOldDate(save.getSocialEndDateReduce()));
//处理社保减少截止时间和医保减少截止时间
initSocialEndDateReduce(holidayMap, save);
}
if (Common.isNotNull(save.getMedicalStartDateReduce())){
save.setMedicalStartDateReduce(this.getNewDateByOldDate(save.getMedicalStartDateReduce()));
}
if (Common.isNotNull(save.getMedicalEndDateReduce())){
save.setMedicalEndDateReduce(this.getNewDateByOldDate(save.getMedicalEndDateReduce()));
//处理社保减少截止时间和医保减少截止时间
initMedicalEndDateReduce(holidayMap, save);
}
initSocialEndDate(holidayMap, save);
initMedicalEndDate(holidayMap, save);
save.setUpdateTime(null);
save.setUpdateBy(null);
save.setUpdateName(null);
//已存在跳过
queryWrapper = initCountQuery(save,queryWrapper);
if (baseMapper.selectCount(queryWrapper) > 0){
continue;
......@@ -458,6 +476,28 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
initSocialEndDate(holidayMap,save);
}
private void initSocialEndDateReduce(Map<String, String> holidayMap, TSocialDeadlineInfo save) {
// type 0 休假 1 补班
String day= holidayMap.get(DateUtil.getDay(save.getSocialEndDateReduce()));
if (Common.isNotNull(day)){
save.setSocialEndDateReduce(DateUtil.addDayByDate(save.getSocialEndDateReduce(),CommonConstants.ONE_INT_NEGATE));
}else {
return;
}
initSocialEndDateReduce(holidayMap,save);
}
private void initMedicalEndDateReduce(Map<String, String> holidayMap, TSocialDeadlineInfo save) {
// type 0 休假 1 补班
String day= holidayMap.get(DateUtil.getDay(save.getMedicalEndDateReduce()));
if (Common.isNotNull(day)){
save.setMedicalEndDateReduce(DateUtil.addDayByDate(save.getMedicalEndDateReduce(),CommonConstants.ONE_INT_NEGATE));
}else {
return;
}
initMedicalEndDateReduce(holidayMap,save);
}
/**
* @Description: 获取 当月启用 的配置
* @Author: hgw
......@@ -494,4 +534,33 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
}
return setMap;
}
@Override
public Map<String, TSocialDeadlineInfo> getSocialSetByAreaId() {
Map<String, TSocialDeadlineInfo> setMap = new HashMap<>();
List<TSocialDeadlineInfo> setlist = baseMapper.selectList(Wrappers.<TSocialDeadlineInfo>query().lambda()
.eq(TSocialDeadlineInfo::getMonth, DateUtil.getThisMonth())
.eq(TSocialDeadlineInfo::getStatus, CommonConstants.ZERO_STRING));
if (setlist != null && !setlist.isEmpty()) {
StringBuilder addressKey;
for (TSocialDeadlineInfo socialSet : setlist) {
if (Common.isNotNull(socialSet.getProvince())) {
addressKey = new StringBuilder(socialSet.getProvince()).append(CommonConstants.DOWN_LINE_STRING);
if (Common.isEmpty(socialSet.getCity())) {
addressKey.append(CommonConstants.CENTER_SPLIT_LINE_STRING);
} else {
addressKey.append(socialSet.getCity());
}
addressKey.append(CommonConstants.DOWN_LINE_STRING);
if (Common.isEmpty(socialSet.getTown())) {
addressKey.append(CommonConstants.CENTER_SPLIT_LINE_STRING);
} else {
addressKey.append(socialSet.getTown());
}
setMap.put(addressKey.toString(), socialSet);
}
}
}
return setMap;
}
}
......@@ -109,6 +109,7 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
if (Common.isNotNull(searchVo.getAuthType())){
wrapper.eq(TSocialfundHouseRes::getAuthType,searchVo.getAuthType());
}
wrapper.last(CommonConstants.LAST_ONE_SQL);
TSocialfundHouseRes socialfundHouseRes = baseMapper.selectOne(wrapper);
if (Common.isNotNull(socialfundHouseRes)) {
String errorMessage;
......
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