Merge remote-tracking branch 'origin/dev_xd' into dev_xd

dev_xd
haha 2025-02-05 23:46:45 +08:00
commit dedd2dc535
4 changed files with 80 additions and 2 deletions

View File

@ -201,17 +201,19 @@ public class WxController extends BaseController {
} }
/** /**
* * ocr
* @param url * @param url
* @return * @return
*/ */
@GetMapping("/cardOCR/front") @GetMapping("/cardOCR/front")
public AjaxResult getFront(String url) { public AjaxResult getFront(String url) {
url = "https://xiangguan.sxyanzhu.com"+url;
return AjaxResult.success(OcrService.getFront(url)); return AjaxResult.success(OcrService.getFront(url));
} }
@GetMapping("/cardOCR/back") @GetMapping("/cardOCR/back")
public AjaxResult getBack(String url) { public AjaxResult getBack(String url) {
url = "https://xiangguan.sxyanzhu.com"+url;
return AjaxResult.success(OcrService.getBack(url)); return AjaxResult.success(OcrService.getBack(url));
} }
} }

View File

@ -17,6 +17,7 @@ import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.manage.utils.WxQrCodeUtils;
import com.yanzhu.manage.utils.pdf.FileUtil; import com.yanzhu.manage.utils.pdf.FileUtil;
import com.yanzhu.manage.utils.pdf.PdfImageSignetUtil;
import com.yanzhu.manage.utils.pdf.PoiUtil; import com.yanzhu.manage.utils.pdf.PoiUtil;
import com.yanzhu.security.utils.DictUtils; import com.yanzhu.security.utils.DictUtils;
import com.yanzhu.system.api.RemoteFlowService; import com.yanzhu.system.api.RemoteFlowService;
@ -854,6 +855,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override @Override
public void approveSubDeptsUserGroSign(Long id){ public void approveSubDeptsUserGroSign(Long id){
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id); ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
ProProjectInfoSubdeptsUsers myProUser = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proProjectInfoSubdeptsUsers.getProjectId(),SecurityUtils.getUserId());
String filePath = proProjectInfoSubdeptsUsers.getEduFilePath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, filePath, myProUser.gets().replace(Constants.RESOURCE_PREFIX, AppConfig.getProfile()),SignetTypeEnum.USER.getCode());
} }
/** /**

View File

@ -50,6 +50,22 @@ export function findMyTask(data) {
}) })
} }
// 获取身份证正面信息
export function findCardOcrFront(url){
return request({
url: '/wxApi/cardOCR/front?url='+url,
method: 'get'
})
}
// 获取身份证反面信息
export function findCardOcrBack(url){
return request({
url: '/wxApi/cardOCR/back?url='+url,
method: 'get'
})
}
// 查询用户部门信息 // 查询用户部门信息
export function findMyDeptList(){ export function findMyDeptList(){
return request({ return request({

View File

@ -27,7 +27,9 @@ import {
submitUserSignets submitUserSignets
} from '../../api/busEdu' } from '../../api/busEdu'
import { import {
findDictCache findDictCache,
findCardOcrBack,
findCardOcrFront,
} from '../../api/publics' } from '../../api/publics'
import { import {
securityFileUpload, securityFileUpload,
@ -929,6 +931,23 @@ Page({
this.setData({ this.setData({
"form.subDeptInfos.legalPersonCardImgPos": file "form.subDeptInfos.legalPersonCardImgPos": file
}); });
file.forEach(async (item, idx) => {
let obj = await this.syncUploadImage(item);
findCardOcrFront(obj.data.data.url).then(res =>{
if(res.code==200){
this.setData({
"form.subDeptInfos.legalPerson": res.data.name,
"form.subDeptInfos.legalPersonCard": res.data.cardId
})
if(!res.data.name || !res.data.cardId){
this.setData({
"form.subDeptInfos.legalPersonCardImgPos": []
});
app.toast("身份证正面照识别失败!请重新上传");
}
}
});
})
}, },
/** /**
@ -993,6 +1012,23 @@ Page({
this.setData({ this.setData({
"form.leaderCardImgPos": file "form.leaderCardImgPos": file
}); });
file.forEach(async (item, idx) => {
let obj = await this.syncUploadImage(item);
findCardOcrFront(obj.data.data.url).then(res =>{
if(res.code==200){
this.setData({
"form.subDeptLeaderName": res.data.name,
"form.subDeptLeaderCode": res.data.cardId
})
if(!res.data.name || !res.data.cardId){
this.setData({
"form.leaderCardImgPos": []
});
app.toast("身份证正面照识别失败!请重新上传");
}
}
});
})
}, },
/** /**
@ -1119,6 +1155,26 @@ Page({
this.setData({ this.setData({
"form.cardImgPos": file "form.cardImgPos": file
}); });
console.log("filefilefilefile",file)
file.forEach(async (item, idx) => {
let obj = await this.syncUploadImage(item);
findCardOcrFront(obj.data.data.url).then(res =>{
if(res.code==200){
this.setData({
"form.userName": res.data.name,
"form.cardCode": res.data.cardId,
"form.nativePlace": res.data.native,
"form.address": res.data.address
})
if(!res.data.name || !res.data.cardId){
this.setData({
"form.cardImgPos": []
});
app.toast("身份证正面照识别失败!请重新上传");
}
}
});
})
}, },
/** /**