|
@@ -69,6 +69,8 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
BrandWebsitService brandWebsitService;
|
|
|
@Resource
|
|
|
InsureWorkerRecordService insureWorkerRecordService;
|
|
|
+ @Resource
|
|
|
+ WorkerCertGreeService workerCertGreeService;
|
|
|
|
|
|
|
|
|
|
|
@@ -79,7 +81,6 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
List<OutWorkerUpload> recs = new ArrayList<>();
|
|
|
Worker worker = new Worker();
|
|
|
List<WorkerBrandAccount> workerBrandAccount = new ArrayList<>();
|
|
|
- WorkerStreet workerStreet = new WorkerStreet();
|
|
|
List<SignSplb> jySignSplbList = new ArrayList<>();
|
|
|
List<SignSplb> sySignSplbList = new ArrayList<>();
|
|
|
List<SignSplb> jyList = new ArrayList<>();
|
|
@@ -145,10 +146,10 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
continue;
|
|
|
}*/
|
|
|
|
|
|
- // 验证师傅的保险证信息 所有网点都验证 这里只验证是否成功上传了图片
|
|
|
+ /*// 验证师傅的保险证信息 所有网点都验证 这里只验证是否成功上传了图片
|
|
|
if (checkBXOutInsureCert(workerBrandAccount)) {
|
|
|
continue;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
// 按网点同步
|
|
|
for (WorkerBrandAccount dot: workerBrandAccount){
|
|
@@ -344,7 +345,7 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private String extracted(List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
|
|
|
+ private String extractedBak(List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
|
|
|
List<SignSplb> jyList, List<SignSplb> syList, WebsitQXLB websitqypl,String brandWebsitNumber) {
|
|
|
String result = "";
|
|
|
List<String> syfwlbList = new ArrayList<>();
|
|
@@ -412,17 +413,74 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ private String extracted(List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
|
|
|
+ List<SignSplb> jyList, List<SignSplb> syList, WebsitQXLB websitqypl,String brandWebsitNumber) {
|
|
|
+ String result = "";
|
|
|
+
|
|
|
+ if (websitqypl.getJySignSplbList().size()<1 && websitqypl.getSySignSplbList().size()<1){
|
|
|
+ result="网点【"+brandWebsitNumber+"】暂未签约品类";
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 过滤商用品类
|
|
|
+ if (websitqypl.getSySignSplbList().size()>0 && sySignSplbList.size()>0){
|
|
|
+ for (SignSplb sy : sySignSplbList) {
|
|
|
+ for (SignSplb wdsy : websitqypl.getSySignSplbList()) {
|
|
|
+ if (wdsy.getSpdl().equals(sy.getSpdl())){
|
|
|
+ List<String> syfwlbList = new ArrayList<>();
|
|
|
+ // 大类名称 取交集
|
|
|
+ wdsy.getFwlbList().retainAll(sy.getFwlbList());
|
|
|
+ syfwlbList.addAll(wdsy.getFwlbList());
|
|
|
+ SignSplb one = new SignSplb();
|
|
|
+ one.setFwlbList(syfwlbList);
|
|
|
+ one.setSpdl(wdsy.getSpdl());
|
|
|
+ one.setSpdlName(wdsy.getSpdlName());
|
|
|
+ // 以总部的为准
|
|
|
+ if (wdsy.getSpxl()!=null){
|
|
|
+ one.setSpxl(wdsy.getSpxl());
|
|
|
+ one.setSpxlName(wdsy.getSpxlName());
|
|
|
+ }
|
|
|
+ syList.add(one);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 过滤家用品类
|
|
|
+ if (websitqypl.getJySignSplbList().size()>0 && jySignSplbList.size()>0){
|
|
|
+ for (SignSplb jy : jySignSplbList) {
|
|
|
+ for (SignSplb wdjy : websitqypl.getJySignSplbList()) {
|
|
|
+ if (wdjy.getSpdl().equals(jy.getSpdl()) ){
|
|
|
+ List<String> jyfwlbList = new ArrayList<>();
|
|
|
+ // 大类名称 取交集
|
|
|
+ wdjy.getFwlbList().retainAll(jy.getFwlbList());
|
|
|
+ jyfwlbList.addAll(wdjy.getFwlbList());
|
|
|
+ SignSplb one = new SignSplb();
|
|
|
+ one.setFwlbList(jyfwlbList);
|
|
|
+ one.setSpdl(wdjy.getSpdl());
|
|
|
+ one.setSpdlName(wdjy.getSpdlName());
|
|
|
+ if (wdjy.getSpxl()!=null){
|
|
|
+ one.setSpxl(wdjy.getSpxl());
|
|
|
+ one.setSpxlName(wdjy.getSpxlName());
|
|
|
+ }
|
|
|
+ jyList.add(one);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
private Boolean checkNecessary(Worker worker, OutWorkerUpload item, WorkerCertificateInfo workerCertificateInfo) {
|
|
|
if (StringUtils.isEmpty(workerCertificateInfo.getSfzbh())){
|
|
|
updateWorkerUploadLag(item,"师傅缺失身份证信息,不上传");
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
- // 可不买保险 虚构保单
|
|
|
- if (StringUtils.isNotEmpty(workerCertificateInfo.getBxz()) && StringUtils.isEmpty(worker.getSafeNo())){
|
|
|
- worker.setSafeNo("99999999");
|
|
|
- }
|
|
|
|
|
|
- if (StringUtils.isEmpty(worker.getSafeNo()) || StringUtils.isEmpty(workerCertificateInfo.getBxz())){
|
|
|
+ if (StringUtils.isEmpty(workerCertificateInfo.getBxz())){
|
|
|
updateWorkerUploadLag(item,"师傅缺失保险信息,不上传");
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
@@ -445,137 +503,146 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
+ // 1:身份证、2:保险,3:高空证(复审时间必填) 这三个条件必备否则无法同步
|
|
|
private Boolean getCertificateInfo(WorkerCertificateInfo workerCertificateInfo, String workerId, WorkerBrandAccount dot) throws ParseException {
|
|
|
+ // 提取师傅所在网点的证件信息
|
|
|
+ List<WorkerCertGree> wcgs = workerCertGreeService.lambdaQuery()
|
|
|
+ .eq(WorkerCertGree::getWorkerId,workerId)
|
|
|
+ .eq(WorkerCertGree::getBrandWebsitId,dot.getBrandWebsitId()).list();
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(wcgs)){
|
|
|
+ return Boolean.FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
// 身份证
|
|
|
- if (getsfz(workerCertificateInfo, workerId)){
|
|
|
+ if (getsfz(workerCertificateInfo, workerId, wcgs)){
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
// 保险证
|
|
|
- if (getbxz(workerCertificateInfo, dot)){
|
|
|
+ if (getbxz(workerCertificateInfo, dot, wcgs)){
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
// 高空作业证
|
|
|
- if (getgkz(workerCertificateInfo, workerId)){
|
|
|
+ if (getgkz(workerCertificateInfo, workerId, wcgs)){
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
// 上岗资格证
|
|
|
- if (getsgz(workerCertificateInfo, workerId)){
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
+ getsgz(workerCertificateInfo, workerId, wcgs);
|
|
|
+
|
|
|
// 制冷工证
|
|
|
- if (getzlz(workerCertificateInfo, workerId)){
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
+ getzlz(workerCertificateInfo, workerId, wcgs);
|
|
|
+
|
|
|
// 驾驶证
|
|
|
- if (getjsz(workerCertificateInfo, workerId)){
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
+ getjsz(workerCertificateInfo, workerId,wcgs);
|
|
|
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
- private Boolean getCertificateInfoWorkerCert(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
- // 提取身份证信息 无不同步
|
|
|
- if (getsfz(workerCertificateInfo, workerId)){
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
|
|
|
- // 高空作业证
|
|
|
- if (getgkz(workerCertificateInfo, workerId)){
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
+ // true为有信息
|
|
|
+ private Boolean getjsz(WorkerCertificateInfo workerCertificateInfo, String workerId, List<WorkerCertGree> wcgs) throws ParseException {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
|
|
|
- return Boolean.FALSE;
|
|
|
- }
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("驾驶证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // true为有信息
|
|
|
- private Boolean getjsz(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
- WorkerCert certificate = getCertificateInfo(workerId,"驾驶证");
|
|
|
// 无证件不处理
|
|
|
- if (certificate == null){
|
|
|
- return Boolean.FALSE;
|
|
|
- }
|
|
|
- // 身份证信息未同步,不操作
|
|
|
- if (!certificate.getOutSyncStatus().equals(1)){
|
|
|
+ if (wcg == null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl())){
|
|
|
- workerCertificateInfo.setJszz(certificate.getOutFileUrl());
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setJszz(wcg.getOutFileUrl());
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl2())){
|
|
|
- workerCertificateInfo.setJszf(certificate.getOutFileUrl2());
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setJszf(wcg.getOutFileUrl2());
|
|
|
}
|
|
|
|
|
|
- if (certificate.getExpireTime() !=null){
|
|
|
- workerCertificateInfo.setJszyxq(datesub(certificate.getExpireTime()));
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setJszyxq(datesub(wcg.getExpireTime()));
|
|
|
}
|
|
|
- if (certificate.getReviewTime() !=null){
|
|
|
- workerCertificateInfo.setJszfsrq(datesub(certificate.getReviewTime()));
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setJszfsrq(datesub(wcg.getReviewTime()));
|
|
|
}
|
|
|
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
// true为有信息
|
|
|
- private Boolean getzlz(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
- WorkerCert certificate = getCertificateInfo(workerId,"制冷证");
|
|
|
- // 无证件不处理
|
|
|
- if (certificate == null){
|
|
|
- return Boolean.FALSE;
|
|
|
+ private Boolean getzlz(WorkerCertificateInfo workerCertificateInfo, String workerId, List<WorkerCertGree> wcgs) throws ParseException {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
+
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("制冷证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- // 身份证信息未同步,不操作
|
|
|
- if (!certificate.getOutSyncStatus().equals(1)){
|
|
|
+
|
|
|
+ // 无证件不处理
|
|
|
+ if (wcg == null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl())){
|
|
|
- workerCertificateInfo.setZlgz(certificate.getOutFileUrl());
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setZlgz(wcg.getOutFileUrl());
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl2())){
|
|
|
- workerCertificateInfo.setZlgf(certificate.getOutFileUrl2());
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setZlgf(wcg.getOutFileUrl2());
|
|
|
}
|
|
|
- workerCertificateInfo.setZlgbh(certificate.getCertNo());
|
|
|
+ workerCertificateInfo.setZlgbh(wcg.getCertNo());
|
|
|
|
|
|
- if (certificate.getExpireTime() !=null){
|
|
|
- workerCertificateInfo.setZlgyxq(datesub(certificate.getExpireTime()));
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setZlgyxq(datesub(wcg.getExpireTime()));
|
|
|
}
|
|
|
- if (certificate.getReviewTime() !=null){
|
|
|
- workerCertificateInfo.setZlgfsrq(datesub(certificate.getReviewTime()));
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setZlgfsrq(datesub(wcg.getReviewTime()));
|
|
|
}
|
|
|
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
// true为有证件
|
|
|
- private Boolean getsgz(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
- WorkerCert certificate = getCertificateInfo(workerId,"上岗证");
|
|
|
- // 无证件不处理
|
|
|
- if (certificate == null){
|
|
|
- return Boolean.FALSE;
|
|
|
+ private Boolean getsgz(WorkerCertificateInfo workerCertificateInfo, String workerId, List<WorkerCertGree> wcgs) throws ParseException {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
+
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("上岗证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- // 身份证信息未同步,不操作
|
|
|
- if (!certificate.getOutSyncStatus().equals(1)){
|
|
|
+
|
|
|
+ // 无证件不处理
|
|
|
+ if (wcg == null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl())){
|
|
|
- workerCertificateInfo.setSgzgzz(certificate.getOutFileUrl());
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setSgzgzz(wcg.getOutFileUrl());
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(certificate.getOutFileUrl2())){
|
|
|
- workerCertificateInfo.setSgzgzf(certificate.getOutFileUrl2());
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setSgzgzf(wcg.getOutFileUrl2());
|
|
|
}
|
|
|
- workerCertificateInfo.setSgzgzbh(certificate.getCertNo());
|
|
|
+ workerCertificateInfo.setSgzgzbh(wcg.getCertNo());
|
|
|
|
|
|
- if (certificate.getExpireTime() !=null){
|
|
|
- workerCertificateInfo.setSgzgzyxq(datesub(certificate.getExpireTime()));
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setSgzgzyxq(datesub(wcg.getExpireTime()));
|
|
|
}
|
|
|
- if (certificate.getReviewTime() !=null){
|
|
|
- workerCertificateInfo.setSgzgzfsrq(datesub(certificate.getReviewTime()));
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setSgzgzfsrq(datesub(wcg.getReviewTime()));
|
|
|
}
|
|
|
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
// true为有信息
|
|
|
- private Boolean getgkz(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
+ private Boolean getgkzBak(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
WorkerCert certificate = getCertificateInfo(workerId,"高空证");
|
|
|
// 无证件不处理
|
|
|
if (certificate == null){
|
|
@@ -603,8 +670,44 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
+ private Boolean getgkz(WorkerCertificateInfo workerCertificateInfo, String workerId,List<WorkerCertGree> wcgs) throws ParseException {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
+
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("高空证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 无证件不处理
|
|
|
+ if (wcg == null){
|
|
|
+ return Boolean.TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setGkzz(wcg.getOutFileUrl());
|
|
|
+ workerCertificateInfo.setGkzyztp(wcg.getOutFileUrl());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setGkzf(wcg.getOutFileUrl2());
|
|
|
+ workerCertificateInfo.setGkzyztp(wcg.getOutFileUrl2());
|
|
|
+ }
|
|
|
+ workerCertificateInfo.setGkzbh(wcg.getCertNo());
|
|
|
+
|
|
|
+
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setGkzyxq(datesub(wcg.getExpireTime()));
|
|
|
+ }
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setGkzfsrq(datesub(wcg.getReviewTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ return Boolean.FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
// true为有信息
|
|
|
- private Boolean getbxz(WorkerCertificateInfo workerCertificateInfo,WorkerBrandAccount dot) {
|
|
|
+ private Boolean getbxzBak(WorkerCertificateInfo workerCertificateInfo,WorkerBrandAccount dot) {
|
|
|
// 查家用保险
|
|
|
WebsitWorker wk = websitWorkerService.lambdaQuery()
|
|
|
.eq(WebsitWorker::getWorkerId, dot.getWorkerId())
|
|
@@ -625,6 +728,42 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private Boolean getbxz(WorkerCertificateInfo workerCertificateInfo,WorkerBrandAccount dot, List<WorkerCertGree> wcgs) {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
+
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("保险证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 无证件不处理
|
|
|
+ if (wcg == null){
|
|
|
+ return Boolean.TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setBxz(wcg.getOutFileUrl());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setBxf(wcg.getOutFileUrl2());
|
|
|
+ }
|
|
|
+ workerCertificateInfo.setSafeNo(wcg.getSafeCompany() + "/" + wcg.getCertNo());
|
|
|
+
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setBxyxq(datesub(wcg.getExpireTime()));
|
|
|
+ }
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setBxfsrq(datesub(wcg.getReviewTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 师傅必买保险,所以不会不存在
|
|
|
+ return Boolean.FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
// true为有信息
|
|
|
private Boolean getbxzInsBak(WorkerCertificateInfo workerCertificateInfo,WorkerBrandAccount dot) {
|
|
|
InsureWorkerCommercial iwc = insureWorkerCommercialService.lambdaQuery()
|
|
@@ -697,12 +836,14 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
- private Boolean getsfz(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
+ private Boolean getsfzBak(WorkerCertificateInfo workerCertificateInfo, String workerId) throws ParseException {
|
|
|
WorkerCert certificate = getCertificateInfo(workerId,"身份证");
|
|
|
+
|
|
|
// 无证件不处理
|
|
|
if (certificate == null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
+
|
|
|
// 身份证信息未同步,不操作
|
|
|
if (!certificate.getOutSyncStatus().equals(1)){
|
|
|
return Boolean.TRUE;
|
|
@@ -725,6 +866,39 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
return Boolean.FALSE;
|
|
|
}
|
|
|
|
|
|
+ private Boolean getsfz(WorkerCertificateInfo workerCertificateInfo, String workerId, List<WorkerCertGree> wcgs) throws ParseException {
|
|
|
+ WorkerCertGree wcg = null;
|
|
|
+
|
|
|
+ for (WorkerCertGree item :wcgs){
|
|
|
+ if ("身份证".equals(item.getCertName())){
|
|
|
+ wcg= item;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 无证件不处理
|
|
|
+ if (wcg == null){
|
|
|
+ return Boolean.TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl())){
|
|
|
+ workerCertificateInfo.setSfzz(wcg.getOutFileUrl());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(wcg.getOutFileUrl2())){
|
|
|
+ workerCertificateInfo.setSfzf(wcg.getOutFileUrl2());
|
|
|
+ }
|
|
|
+ workerCertificateInfo.setSfzbh(wcg.getCertNo());
|
|
|
+
|
|
|
+ if (wcg.getExpireTime() !=null){
|
|
|
+ workerCertificateInfo.setSfzyxq(datesub(wcg.getExpireTime()));
|
|
|
+ }
|
|
|
+ if (wcg.getReviewTime() !=null){
|
|
|
+ workerCertificateInfo.setSfzfsrq(datesub(wcg.getReviewTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ return Boolean.FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
public String datesub(@NotNull Date d) {
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
|
|
|
long localTime = d.getTime()-8*60*60*1000;
|
|
@@ -958,15 +1132,10 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
}
|
|
|
|
|
|
// 保险 必要条件
|
|
|
- if (StringUtils.isNotEmpty(worker.getSafeNo())){
|
|
|
+ if (StringUtils.isNotEmpty(workerCertificateInfo.getBxz())){
|
|
|
ZJInfo zjInfo = new ZJInfo();
|
|
|
- WebsitWorker ww = new WebsitWorker();
|
|
|
- ww = websitWorkerService.lambdaQuery()
|
|
|
- .eq(WebsitWorker::getWebsitWorkerId,websitWorkerId)
|
|
|
- .last("limit 1")
|
|
|
- .one();
|
|
|
|
|
|
- zjInfo.setZjbh(ww.getSafeCompany()+"/"+ ww.getSafeNo());
|
|
|
+ zjInfo.setZjbh(workerCertificateInfo.getSafeNo());
|
|
|
zjInfo.setZjmc("保险证");
|
|
|
|
|
|
// 证件路径 必填
|
|
@@ -1134,13 +1303,13 @@ public class UploadWorkerTOGreeServiceImpl implements UploadWorkerTOGreeService
|
|
|
List<String> SYDictDaleiCode, List<WorkerServiceCategoryDetail> wxgCategoryRecs) {
|
|
|
List<SysDictRef> sysDictRefs = new ArrayList<>();
|
|
|
|
|
|
- // 组装参数类别名称信息
|
|
|
+ // 组装参数类别名称信息 服务类型 分,安装、维修、配送等
|
|
|
List<String> fwlbList = getCategoryName(wxgCategoryRecs);
|
|
|
|
|
|
- // 获取师傅在品牌商品对应的类别信息
|
|
|
+ // 获取师傅在品牌商品对应的类别信息 这里的类别为师傅服务的有效的大类别信息 sysDictRefs
|
|
|
getDictRefs(brand, wxgCategoryRecs, sysDictRefs);
|
|
|
|
|
|
- // 组装品类参数
|
|
|
+ // 组装品类参数 大类下的所有小类都放在一起
|
|
|
for (SysDictRef item:sysDictRefs){
|
|
|
// 大类对应的小类必填
|
|
|
// 获取品牌商的大类对应的所有小类信息
|