Commit 7bb63026 authored by hongguangwu's avatar hongguangwu

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

parents 7fd568b5 311c33f1
......@@ -124,11 +124,11 @@ public class WxConfig {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson();
log.error("发企业微信===请求:{}", 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.error("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
log.info("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) {
......
......@@ -90,6 +90,10 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
public R deleteById(String id) {
TInsuranceUnpurchaseApply apply = baseMapper.selectById(id);
if (Common.isNotNull(apply)) {
String[] allowDel = {CommonConstants.ZERO_STRING,CommonConstants.ONE_STRING, CommonConstants.FOUR_STRING};
if(!ArrayUtils.contains(allowDel, apply.getStatus())) {
return R.failed("数据状态发生改变,不能删除");
}
baseMapper.deleteById(apply);
personService.remove(Wrappers.<TInsuranceUnpurchasePerson>query().lambda().eq(TInsuranceUnpurchasePerson::getParnetId, id));
return R.ok();
......@@ -361,6 +365,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
private void initValue(TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply,TInsuranceUnpurchasePerson person) {
person.setCreateTime(tInsuranceUnpurchaseApply.getCreateTimeZc());
person.setParnetId(tInsuranceUnpurchaseApply.getId());
person.setApplyNo(tInsuranceUnpurchaseApply.getApplyNo());
person.setDeptId(tInsuranceUnpurchaseApply.getDeptId());
......@@ -370,6 +375,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
person.setNewLine(tInsuranceUnpurchaseApply.getNewLine());
person.setReasonType(tInsuranceUnpurchaseApply.getReasonType());
person.setHasContainRisks(tInsuranceUnpurchaseApply.getHasContainRisks());
person.setInsuranceFlag(tInsuranceUnpurchaseApply.getInsuranceFlag());
person.setReasonInfo(tInsuranceUnpurchaseApply.getReasonInfo());
person.setCreateBy(tInsuranceUnpurchaseApply.getCreateBy());
person.setCreateName(tInsuranceUnpurchaseApply.getCreateName());
......
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