|
@@ -84,6 +84,7 @@ public class TCorpsServiceImpl implements ITCorpsService {
|
|
if (StringUtils.isEmpty(tCustomerContacts)) {
|
|
if (StringUtils.isEmpty(tCustomerContacts)) {
|
|
return AjaxResult.error("提交失败:客户联系人为空");
|
|
return AjaxResult.error("提交失败:客户联系人为空");
|
|
}
|
|
}
|
|
|
|
+ Long fPid = null;
|
|
TCorps corps = JSONArray.parseObject(tCorps, TCorps.class);
|
|
TCorps corps = JSONArray.parseObject(tCorps, TCorps.class);
|
|
JSONArray jsonArray = JSONArray.parseArray(tCustomerContacts);
|
|
JSONArray jsonArray = JSONArray.parseArray(tCustomerContacts);
|
|
List<TCustomerContact> customerContactList = JSONObject.parseArray(jsonArray.toJSONString(), TCustomerContact.class);
|
|
List<TCustomerContact> customerContactList = JSONObject.parseArray(jsonArray.toJSONString(), TCustomerContact.class);
|
|
@@ -92,13 +93,16 @@ public class TCorpsServiceImpl implements ITCorpsService {
|
|
corps.setCreateBy(loginUser.getUser().getUserName());
|
|
corps.setCreateBy(loginUser.getUser().getUserName());
|
|
corps.setCreateTime(new Date());
|
|
corps.setCreateTime(new Date());
|
|
tCorpsMapper.insertTCorps(corps);
|
|
tCorpsMapper.insertTCorps(corps);
|
|
|
|
+ fPid=corps.getfId();
|
|
} else {
|
|
} else {
|
|
|
|
+ fPid=corps.getfId();
|
|
corps.setUpdateBy(loginUser.getUser().getUserName());
|
|
corps.setUpdateBy(loginUser.getUser().getUserName());
|
|
corps.setUpdateTime(new Date());
|
|
corps.setUpdateTime(new Date());
|
|
tCorpsMapper.updateById(corps);
|
|
tCorpsMapper.updateById(corps);
|
|
tCustomerContactMapper.delete(new EntityWrapper<TCustomerContact>().eq("f_pid", corps.getfId()));
|
|
tCustomerContactMapper.delete(new EntityWrapper<TCustomerContact>().eq("f_pid", corps.getfId()));
|
|
}
|
|
}
|
|
for (TCustomerContact cc : customerContactList) {
|
|
for (TCustomerContact cc : customerContactList) {
|
|
|
|
+ cc.setfPid(fPid);
|
|
cc.setfStatus("0");
|
|
cc.setfStatus("0");
|
|
cc.setCreateBy(loginUser.getUser().getUserName());
|
|
cc.setCreateBy(loginUser.getUser().getUserName());
|
|
cc.setCreateTime(new Date());
|
|
cc.setCreateTime(new Date());
|