Commit 78b65e5d authored by hongguangwu's avatar hongguangwu

MVP1.7.13-附件

parent 8d301b02
...@@ -57,11 +57,11 @@ public class TAttaInfo extends BaseEntity { ...@@ -57,11 +57,11 @@ public class TAttaInfo extends BaseEntity {
@Schema(description = "资源类型") @Schema(description = "资源类型")
private String attaType; private String attaType;
/** /**
* 1户配置的章;2:派单审核附件,税友单个使用 * 1户配置的章;2:派单审核附件,税友单个使用,社保3医保附件
*/ */
@NotBlank(message = "关系类型不能为空") @NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符") @Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(1户配置的章;2:派单审核附件,税友单个使用)") @Schema(description = "关系类型(1户配置的章;2:派单审核附件,税友单个使用,社保;3医保附件)")
private String relationType; private String relationType;
/** /**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id) * 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
......
...@@ -83,8 +83,10 @@ public class SociaFriendYgsAddVo implements Serializable { ...@@ -83,8 +83,10 @@ public class SociaFriendYgsAddVo implements Serializable {
// 企业职工社会保险增员花名册 qyzgshbxzyhmc // 企业职工社会保险增员花名册 qyzgshbxzyhmc
private String qyzgshbxzyhmc; private String qyzgshbxzyhmc;
// 单个附件list // 单个附件list_社保
private List<String> imgList; private List<String> imgListYgs;
// 单个附件list——医保
private List<String> imgListYsd;
// 自动生成解除劳动证明 // 自动生成解除劳动证明
private String autoLeaveDoc; private String autoLeaveDoc;
// 当前行政经办区——2025-3-31 10:23:02 盛宇与税友沟通,可以默认安徽省,暂时不用这个字段了,后面有特殊要求再加 // 当前行政经办区——2025-3-31 10:23:02 盛宇与税友沟通,可以默认安徽省,暂时不用这个字段了,后面有特殊要求再加
......
...@@ -158,9 +158,13 @@ public class SocialFriendConfig { ...@@ -158,9 +158,13 @@ public class SocialFriendConfig {
if (Common.isNotNull(vo.getQyzgshbxzyhmc())) { if (Common.isNotNull(vo.getQyzgshbxzyhmc())) {
JSONArray qyzgshbxzyhmclbArr = new JSONArray(); JSONArray qyzgshbxzyhmclbArr = new JSONArray();
qyzgshbxzyhmclbArr.add(vo.getQyzgshbxzyhmc()); qyzgshbxzyhmclbArr.add(vo.getQyzgshbxzyhmc());
if (vo.getImgList() != null && !vo.getImgList().isEmpty()) { if (type <3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松 // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgList()); qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs());
}
if (type >2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd());
} }
if (type == 2 || type == 4) { if (type == 2 || type == 4) {
json.put(fileName, vo.getQyzgshbxzyhmc()); json.put(fileName, vo.getQyzgshbxzyhmc());
...@@ -170,8 +174,13 @@ public class SocialFriendConfig { ...@@ -170,8 +174,13 @@ public class SocialFriendConfig {
} else if (Common.isNotNull(vo.getQyzgjbylbxcbdjb())) { } else if (Common.isNotNull(vo.getQyzgjbylbxcbdjb())) {
JSONArray qyzgshbxzyhmclbArr = new JSONArray(); JSONArray qyzgshbxzyhmclbArr = new JSONArray();
qyzgshbxzyhmclbArr.add(vo.getQyzgjbylbxcbdjb()); qyzgshbxzyhmclbArr.add(vo.getQyzgjbylbxcbdjb());
if (vo.getImgList() != null && !vo.getImgList().isEmpty()) { if (type <3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
qyzgshbxzyhmclbArr.addAll(vo.getImgList()); // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs());
}
if (type >2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd());
} }
if (type == 2 || type == 4) { if (type == 2 || type == 4) {
json.put(fileName, vo.getQyzgjbylbxcbdjb()); json.put(fileName, vo.getQyzgjbylbxcbdjb());
...@@ -426,9 +435,9 @@ public class SocialFriendConfig { ...@@ -426,9 +435,9 @@ public class SocialFriendConfig {
// 单位就业起始时间 社保必填;yyyy-MM-dd // 单位就业起始时间 社保必填;yyyy-MM-dd
tszdxx.put("dwjyqssj", startDate); tszdxx.put("dwjyqssj", startDate);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。 // 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
if (vo.getImgList() != null && !vo.getImgList().isEmpty()) { if (vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
// 税友接口只允许一张 // 税友接口只允许一张
tszdxx.put("sbzycl", vo.getImgList().get(0)); tszdxx.put("sbzycl", vo.getImgListYgs().get(0));
} }
// 用工形式 社保必填 // 盛宇文档对应,只有3种 // 用工形式 社保必填 // 盛宇文档对应,只有3种
...@@ -438,9 +447,9 @@ public class SocialFriendConfig { ...@@ -438,9 +447,9 @@ public class SocialFriendConfig {
// 人员类型 默认:在职职工 // 人员类型 默认:在职职工
tszdxx.put("rylx", "在职职工"); tszdxx.put("rylx", "在职职工");
// 医保个人身份材料 安徽非必填! 无 // 医保个人身份材料 安徽非必填! 无
if (vo.getImgList() != null && !vo.getImgList().isEmpty()) { if (vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
ybzyclArr = new JSONArray(); ybzyclArr = new JSONArray();
ybzyclArr.addAll(vo.getImgList()); ybzyclArr.addAll(vo.getImgListYsd());
tszdxx.put("ybzycl", ybzyclArr); tszdxx.put("ybzycl", ybzyclArr);
} }
// 职业工种 社保必填 默认“办事人员和有关人员” // 职业工种 社保必填 默认“办事人员和有关人员”
...@@ -499,6 +508,7 @@ public class SocialFriendConfig { ...@@ -499,6 +508,7 @@ public class SocialFriendConfig {
JSONObject tszdxx; JSONObject tszdxx;
String blxm = "社保"; String blxm = "社保";
String[] arr = {qyzgjbylbxcbdjb}; String[] arr = {qyzgjbylbxcbdjb};
JSONArray ybjyclArr;
if (type > 2) { if (type > 2) {
blxm = "医保"; blxm = "医保";
} }
...@@ -539,9 +549,23 @@ public class SocialFriendConfig { ...@@ -539,9 +549,23 @@ public class SocialFriendConfig {
if (type > 2) { if (type > 2) {
// 职工基本医疗保险参保登记表 // 职工基本医疗保险参保登记表
tszdxx.put("zgjbylbxcbdjb", arr); tszdxx.put("zgjbylbxcbdjb", arr);
tszdxx.put("ybjycl", vo.getAutoLeaveDoc()); ybjyclArr = new JSONArray();
if (Common.isNotNull(vo.getAutoLeaveDoc())) {
ybjyclArr.add(vo.getAutoLeaveDoc());
}
if (vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
ybjyclArr.addAll(vo.getImgListYsd());
}
tszdxx.put("ybjycl", ybjyclArr);
} else { } else {
if (Common.isNotNull(vo.getAutoLeaveDoc())) {
tszdxx.put("shjycl", vo.getAutoLeaveDoc()); tszdxx.put("shjycl", vo.getAutoLeaveDoc());
} else {
if (vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
// 税友接口只允许一张
tszdxx.put("shjycl", vo.getImgListYgs().get(0));
}
}
} }
cbrymdOne.put("tszdxx", tszdxx); cbrymdOne.put("tszdxx", tszdxx);
cbrymdArr.add(cbrymdOne); cbrymdArr.add(cbrymdOne);
......
...@@ -374,7 +374,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -374,7 +374,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private void setImgList(SociaFriendYgsAddVo vo) { private void setImgList(SociaFriendYgsAddVo vo) {
URL url; URL url;
InputStream inStream = null; InputStream inStream = null;
List<String> imgList = new ArrayList<>(); List<String> imgListYgs = new ArrayList<>();
List<String> imgListYsd = new ArrayList<>();
List<TAttaInfo> attaInfoList = attaInfoMapper.getTAttaInfoListByDoMainId(vo.getDispatchId()); List<TAttaInfo> attaInfoList = attaInfoMapper.getTAttaInfoListByDoMainId(vo.getDispatchId());
if (attaInfoList != null && !attaInfoList.isEmpty()) { if (attaInfoList != null && !attaInfoList.isEmpty()) {
String base64String; String base64String;
...@@ -395,7 +396,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -395,7 +396,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
imgUrl = socialFriendConfig.uploadPng(restTemplate, attaInfo.getAttaName(), base64String, backLog); imgUrl = socialFriendConfig.uploadPng(restTemplate, attaInfo.getAttaName(), base64String, backLog);
tSocialFriendBackLogService.save(backLog); tSocialFriendBackLogService.save(backLog);
if (Common.isNotNull(imgUrl)){ if (Common.isNotNull(imgUrl)){
imgList.add(imgUrl); if (Common.isEmpty(attaInfo.getRelationType()) || CommonConstants.TWO_STRING.equals(attaInfo.getRelationType())) {
imgListYgs.add(imgUrl);
} else {
imgListYsd.add(imgUrl);
}
} }
} catch (Exception e){ } catch (Exception e){
log.info("税友单个图片上传失败!"); log.info("税友单个图片上传失败!");
...@@ -411,7 +416,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -411,7 +416,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
} }
} }
} }
vo.setImgList(imgList); vo.setImgListYgs(imgListYgs);
vo.setImgListYsd(imgListYsd);
} }
} }
...@@ -449,6 +455,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -449,6 +455,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFriendReduceSet reduceSet; TSocialFriendReduceSet reduceSet;
// 是否为生成解除劳动合同书 且是 派减 // 是否为生成解除劳动合同书 且是 派减
boolean isAutoLeaveDoc; boolean isAutoLeaveDoc;
// 是否为单个推送(派单审核时定性的)
boolean isSingle;
for (int index = 0 ; index < ysdAddlist.size(); index++) { for (int index = 0 ; index < ysdAddlist.size(); index++) {
vo = ysdAddlist.get(index); vo = ysdAddlist.get(index);
...@@ -502,9 +510,10 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -502,9 +510,10 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
&& !vo.getSocialHouseholdName().equals(ysdAddlist.get(index+1).getSocialHouseholdName())) { && !vo.getSocialHouseholdName().equals(ysdAddlist.get(index+1).getSocialHouseholdName())) {
nextFlag = true; nextFlag = true;
} }
isSingle = Common.isNotNull(vo.getIsSingle()) && CommonConstants.ONE_STRING.equals(vo.getIsSingle());
isAutoLeaveDoc = templateUrl != null && type == 4 && Common.isNotNull(vo.getIsAutoLeaveDoc()) isAutoLeaveDoc = templateUrl != null && type == 4 && Common.isNotNull(vo.getIsAutoLeaveDoc())
&& CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc()); && CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc());
if (isAutoLeaveDoc || nextFlag || i % 10 == 0 || index >= ysdAddlist.size()-1) { if (isAutoLeaveDoc || isSingle || nextFlag || i % 10 == 0 || index >= ysdAddlist.size()-1) {
// 房工接口,获取 企业职工基本医疗保险参保登记表 url // 房工接口,获取 企业职工基本医疗保险参保登记表 url
urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo); urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo);
if (urlR != null && urlR.getCode() == 200 && Common.isNotNull(urlR.getData())) { if (urlR != null && urlR.getCode() == 200 && Common.isNotNull(urlR.getData())) {
...@@ -514,6 +523,10 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -514,6 +523,10 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if (isAutoLeaveDoc) { if (isAutoLeaveDoc) {
this.doSetAutoDoc(zhangMap, templateUrl, vo, CommonConstants.NINE_INTEGER); this.doSetAutoDoc(zhangMap, templateUrl, vo, CommonConstants.NINE_INTEGER);
} }
if (isSingle && Common.isNotNull(vo.getDispatchId())) {
// 获取单个附件并推送税友,返回 imgList 到Vo里
this.setImgList(vo);
}
i=0; i=0;
requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, thisTime, backLogList); requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, thisTime, backLogList);
ysdHandleStatus = CommonConstants.TWO_STRING; ysdHandleStatus = CommonConstants.TWO_STRING;
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_atta_info a FROM t_atta_info a
where a.domain_id = #{domainId} where a.domain_id = #{domainId}
order by a.relation_type
</select> </select>
<select id="getKeenAtta" resultMap="tAttaInfoMap"> <select id="getKeenAtta" resultMap="tAttaInfoMap">
......
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