fix bug 41644 标协会员项目-在来款系统中来款后,在来款的标协会员页面中,会员编号、会员类型、会员状态没有更新
This commit is contained in:
+38
@@ -7,6 +7,7 @@ import cn.hutool.crypto.asymmetric.RSA;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -102,6 +103,22 @@ public class AuthenticationUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static JSONObject checkGetResult(String response) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
String code = jsonObject.getString("code");
|
||||
String message = jsonObject.getString("message");
|
||||
if (!"200".equals(code)){
|
||||
throw new JeroBootException("查询数据失败!"+message);
|
||||
}else {
|
||||
String result = jsonObject.getString("result");
|
||||
if (StringUtils.isNotBlank(result)) {
|
||||
return JSONObject.parseObject(result);
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用会员系统post接口
|
||||
* @param methodName
|
||||
@@ -123,6 +140,27 @@ public class AuthenticationUtils {
|
||||
checkResult(post);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用会员系统post接口
|
||||
* @param methodName
|
||||
* @param requestParam
|
||||
* @param requestBody
|
||||
*/
|
||||
public static JSONObject postResult(String methodName, String requestParam, Object requestBody) {
|
||||
Map<String, String> stringStringMap = encryptByRsaPriKey();
|
||||
String publicKey = stringStringMap.get("publicKey");
|
||||
String token = stringStringMap.get("token");
|
||||
String jsonString = JSONObject.toJSONString(requestBody);
|
||||
//拼接url路径
|
||||
StringBuilder urlBuilder = new StringBuilder(AuthenticationUtils.URL);
|
||||
urlBuilder.append(methodName).append("?publicKey=").append(publicKey).append("&pushToken=").append(token);
|
||||
if (StrUtil.isNotBlank(requestParam)){
|
||||
urlBuilder.append(requestParam);
|
||||
}
|
||||
String post = HttpUtil.post(urlBuilder.toString(), jsonString);
|
||||
return checkGetResult(post);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用会员系统post接口
|
||||
* @param methodName
|
||||
|
||||
+12
@@ -112,6 +112,18 @@ public class PayPaymentRecordController extends JeroController<PayPaymentRecord,
|
||||
return payPaymentRecordService.standardsAddAR(tbPaymentId,payPaymentRecord,memberInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标协会员更新会员来款信息
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="标协会员更新会员来款信息")
|
||||
@PostMapping(value = "/updateStandards")
|
||||
public void updateStandards(@RequestParam(name="tbPaymentId")String tbPaymentId,
|
||||
@RequestBody MemberInfo memberInfo) {
|
||||
|
||||
payPaymentRecordService.updateStandards(tbPaymentId,memberInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 来款列表
|
||||
* @return
|
||||
|
||||
+4
@@ -48,6 +48,8 @@ public interface IPayPaymentRecordService extends IService<PayPaymentRecord> {
|
||||
*/
|
||||
Result<?> standardsAddAR(String tbPaymentId, PayPaymentRecord payPaymentRecord, MemberInfo memberInfo);
|
||||
|
||||
void updateStandards(String tbPaymentId, MemberInfo memberInfo);
|
||||
|
||||
/**
|
||||
* 编辑来款
|
||||
* @param payPaymentRecord
|
||||
@@ -71,4 +73,6 @@ public interface IPayPaymentRecordService extends IService<PayPaymentRecord> {
|
||||
* @Exception
|
||||
*/
|
||||
BigDecimal getMonthAmountCount(String time);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+26
-6
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.common.RoleCommon;
|
||||
import com.jero.common.dto.SendMessageDTO;
|
||||
import com.jero.common.enums.CompanyMessageEnums;
|
||||
import com.jero.common.enums.ManagementMessageEnums;
|
||||
@@ -39,7 +38,6 @@ import com.jero.payment.entity.PayPaymentRecord;
|
||||
import com.jero.payment.mapper.PayPaymentRecordMapper;
|
||||
import com.jero.payment.service.IPayPaymentRecordService;
|
||||
import com.jero.payment.vo.TbCheckVo;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.PayCommonProject;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
@@ -54,7 +52,6 @@ import com.jero.temporary.entity.PayContactsManagementTemporary;
|
||||
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
||||
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
||||
import org.apache.commons.beanutils.PropertyUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
@@ -64,6 +61,7 @@ import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.annotation.Resource;
|
||||
@@ -79,7 +77,7 @@ import java.util.stream.Collectors;
|
||||
* @Date: 2021-08-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW,rollbackFor = Exception.class)
|
||||
@Service
|
||||
public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMapper, PayPaymentRecord> implements IPayPaymentRecordService {
|
||||
@Resource
|
||||
@@ -153,8 +151,19 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
|
||||
}
|
||||
//推送到会员端
|
||||
if(typr5List !=null && typr5List.size()>0){
|
||||
AuthenticationUtils.post("/paymentInfo/incomingPaymentCheck",null,typr5List);
|
||||
if(typr5List.size()>0){
|
||||
JSONObject jsonObject = AuthenticationUtils.postResult("/paymentInfo/incomingPaymentCheck", null, typr5List);
|
||||
String memberNo = jsonObject.getString("memberNo");
|
||||
Integer memberType = jsonObject.getInteger("memberType");
|
||||
Integer memberStatus = jsonObject.getInteger("memberStatus");
|
||||
MemberInfo memberInfo = new MemberInfo();
|
||||
memberInfo.setMemberNo(memberNo);
|
||||
memberInfo.setMemberType(memberType);
|
||||
memberInfo.setMemberStatus(memberStatus);
|
||||
for (TbCheckVo tbCheckVo : typr5List) {
|
||||
String id = tbCheckVo.getId();
|
||||
updateStandards(id,memberInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,6 +502,17 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStandards(String tbPaymentId, MemberInfo memberInfo) {
|
||||
LambdaQueryWrapper<TbMemberProjectSubitem> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TbMemberProjectSubitem::getTbPaymentId,tbPaymentId);
|
||||
TbMemberProjectSubitem tbMember = tbMemberProjectSubitemMapper.selectOne(wrapper);
|
||||
tbMember.setMemberNo(memberInfo.getMemberNo());
|
||||
tbMember.setMemberType(memberInfo.getMemberType());
|
||||
tbMember.setMemberStatus(memberInfo.getMemberStatus());
|
||||
tbMemberProjectSubitemMapper.updateById(tbMember);
|
||||
}
|
||||
|
||||
//标协类型新增时条件校验
|
||||
private void type5AddCheck(PayPaymentRecord payPaymentRecord){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user