Commit 6ede1946 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.5' into MVP1.7.5

parents b7974563 529de816
......@@ -1948,8 +1948,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
long count = baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, cardVo.getDeptNo())
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard, CommonConstants.ZERO_STRING)
.eq(TEmployeeProject::getDeleteFlag, cardVo.getEmpIdcardNo()));
.eq(TEmployeeProject::getEmpIdcard, cardVo.getEmpIdcardNo())
.eq(TEmployeeProject::getEmpName, cardVo.getEmpName())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING));
return count > 0;
}
......
......@@ -81,7 +81,7 @@ public class TInsuranceUnpurchaseApply extends BaseEntity {
@Schema(description ="当前审核人ID")
private String auditUserId;
@Schema(description ="当前审核人ID")
@Schema(description ="不购买人数")
private String unbuyNum;
@Schema(description ="明细数据集")
......
......@@ -124,11 +124,11 @@ public class WxConfig {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson();
log.info(gson.toJson(requestMap));
log.info("发企业微信===请求:{}", gson.toJson(requestMap));
HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers);
String accessToken = getAccessToken(restTemplate);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class);
log.info(JSON.toJSONString(responseEntity));
log.info("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) {
......@@ -147,41 +147,6 @@ public class WxConfig {
return true;
}
/**
* @param restTemplate
* @param requestMap 请求内容
* @Author: huyc
* @Date: 2023/7/28 14:50
* @Description: 发送卡片消息
* @return: java.lang.String
**/
public boolean sendAppTextCard(RestTemplate restTemplate, Map<String, Object> requestMap) {
// 必须加上header说明
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson();
log.info("发企业微信===请求:{}", gson.toJson(requestMap));
HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers);
String accessToken = getAppAccessToken(restTemplate);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class);
log.info("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) {
String errcode = jsonBody.getString("errcode");
if (accossTokenInvliad.equals(errcode)) {
//删除accossToken缓存
removeAccessToken();
return false;
}
if (!CommonConstants.ZERO_STRING.equals(errcode)) { //非正常,则打印错误日志
log.info(jsonObject.toJSONString());
}
} else {
log.info(jsonObject.toJSONString());
}
return true;
}
/**
* 功能描述: 获取微信accos_token
* @Author: huyc
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.lock.annotation.Lock4j;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -219,10 +220,13 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
List<TInsuranceUnpurchasePersonAddVo> personList = addAndUpdCheck(tInsuranceUnpurchaseApply);
if (Common.isNotNull(personList) && !personList.isEmpty() &&
personList.stream().noneMatch(e -> CommonConstants.ONE_STRING.equals(e.getCode()))) {
tInsuranceUnpurchaseApply.setUnbuyNum(String.valueOf(personList.size()));
if (Common.isNotNull(tInsuranceUnpurchaseApply.getId())) {
//同倩倩确认申请时间实时更新
tInsuranceUnpurchaseApply.setCreateTime(LocalDateTime.now());
baseMapper.updateById(tInsuranceUnpurchaseApply);
//更新附件
updateFileId(tInsuranceUnpurchaseApply);
//先删除明细表数据再重新生成
personService.remove(Wrappers.<TInsuranceUnpurchasePerson>lambdaQuery()
.eq(TInsuranceUnpurchasePerson::getParnetId, tInsuranceUnpurchaseApply.getId()));
......@@ -373,6 +377,10 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
private void updateFileId(TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply) {
if (Common.isNotNull(tInsuranceUnpurchaseApply.getAttaIdList())) {
LambdaUpdateWrapper<TSalaryAtta> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TSalaryAtta::getLinkId,tInsuranceUnpurchaseApply.getId())
.set(TSalaryAtta::getLinkId, CommonConstants.EMPTY_STRING);
tSalaryAttaService.update(updateWrapper);
TSalaryAtta atta;
for (String id : tInsuranceUnpurchaseApply.getAttaIdList()) {
atta = tSalaryAttaService.getById(id);
......
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